Error installing package


(Neil) #1

sudo npm install -g generator-ps-search-ui-sfdc

The package to be installed

Unhandled rejection Error: EISDIR: illegal operation on a directory, open ‘/Users/nwixsom/.npm/_cacache/content-v2/sha512/8e/1d’

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nwixsom/.npm/_logs/2019-02-04T23_34_53_111Z-debug.log

As mentioned above, ran the following:
sudo npm install -g generator-ps-search-ui-sfdc

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’,
1 verbose cli ‘/usr/local/bin/npm’,
1 verbose cli ‘install’,
1 verbose cli ‘-g’,
1 verbose cli ‘generator-ps-search-ui-sfdc’ ]
2 info using npm@6.7.0
3 info using node@v8.9.1
4 verbose npm-session e9be323ea592d821
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 timing npm Completed in 804ms
8 error cb() never called!
9 error This is an error with npm itself. Please report this error at:
10 error <https://npm.community>

MacOS

$ npm --versions
{ npm: '6.7.0',
  ares: '1.10.1-DEV',
  cldr: '31.0.1',
  http_parser: '2.7.0',
  icu: '59.1',
  modules: '57',
  nghttp2: '1.25.0',
  node: '8.9.1',
  openssl: '1.0.2m',
  tz: '2017b',
  unicode: '9.0',
  uv: '1.15.0',
  v8: '6.1.534.47',
  zlib: '1.2.11' }
$ node -p process.platform
darwin

(John Gee) #2

There are multiple reports around EISDIR. The canonical topic to consult is:

At least some problems have been fixed by resetting ownership, and ideally by subsequently avoiding use of sudo. I suggest try this first and see if it fixes the /Users/nwixsom/.npm errors:

sudo chown -R $(whoami) ~/.npm
sudo npm install -g generator-ps-search-ui-sfdc

And if that helps, then I suggest changing ownership of the install folder too and rerunning without sudo like in this comment: opencv4nodejs not installing in MAC OS Mojave 10.14