npm i -g concurrently fails

(Stuart Updegrave) #1

What I Wanted to Do

Trying to install concurrently.

What Happened Instead

Console error message.

Reproduction Steps

npm i -g concurrently

Details

I use nvm to switch Node versions. I got the same error on both npm 6.7.0 (node 11.10.0) and 5.10.0 (node 9.5.0).

Error on 6.7.0

Unhandled rejection Error: EACCES: permission denied, open '/Users/stuart/.npm/_cacache/index-v5/86/38/67cd332218e56148ab0eb89ec176defd516fc7b0dc3276cbe6a7b525e744'

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!    <a class="attachment" href="/uploads/npm1/original/2X/b/b4610be187dfabfe622a6c6fb06500092d724455.log">2019-04-07T11_57_53_409Z-debug.log</a> (10.5 KB)
 <a class="attachment" href="/uploads/npm1/original/2X/c/ce4840352af029b750b8a199db2ed0bba11e374a.log">2019-04-07T12_20_41_317Z-debug.log</a> (10.5 KB)
 

Error on 5.10.0

Unhandled rejection Error: EACCES: permission denied, open '/Users/stuart/.npm/_cacache/index-v5/86/38/67cd332218e56148ab0eb89ec176defd516fc7b0dc3276cbe6a7b525e744'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/stuart/.npm/_logs/2019-04-07T12_20_41_317Z-debug.log

Both debug log files are attached.

Platform Info

$ nvm use 9.5.0
$ npm --versions
{ 'my-project': '1.0.0',
  npm: '5.10.0',
  ares: '1.13.0',
  cldr: '32.0',
  http_parser: '2.7.0',
  icu: '60.1',
  modules: '59',
  napi: '2',
  nghttp2: '1.29.0',
  node: '9.5.0',
  openssl: '1.0.2n',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.1',
  v8: '6.2.414.46-node.18',
  zlib: '1.2.11' }

$ nvm use 11
$ npm --versions
{ 'my-project': '1.0.0',
  npm: '6.7.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '34.0',
  http_parser: '2.8.0',
  icu: '63.1',
  llhttp: '1.1.1',
  modules: '67',
  napi: '4',
  nghttp2: '1.34.0',
  node: '11.10.0',
  openssl: '1.1.1a',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.26.0',
  v8: '7.0.276.38-node.17',
  zlib: '1.2.11' }


$ node -p process.platform
darwin

2019-04-07T11_57_53_409Z-debug.log (10.5 KB)

0 Likes

(Stuart Updegrave) #2

Second debug log file:

2019-04-07T12_20_41_317Z-debug.log (10.5 KB)

0 Likes

(Stuart Updegrave) #3

File /Users/stuart/.npm/_cacache/index-v5/86/38/7628489fd34c7b2542b39f2c7ed7184fc1f1be50ca5d15a782133eb2a4d5:

(unable to upload due to lack of file extension)

6dfa8752b115fd694dfda4dfa601247bc0e3669c	{"key":"pacote:range-manifest:https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz:sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=","integrity":"sha512-C2EkHXwXvLsbrucJTRS3xFHv7Mf/y9klmKDxPTE8yevCoH5h8Ae69Y+/lP+ahpW91crnzgO78elOk2E6APJfIQ==","time":1552643836052,"size":1,"metadata":{"id":"source-map@0.5.7","manifest":{"name":"source-map","version":"0.5.7","engines":{"node":">=0.10.0"},"dependencies":{},"optionalDependencies":{},"devDependencies":{"doctoc":"^0.15.0","webpack":"^1.12.0"},"bundleDependencies":false,"peerDependencies":{},"deprecated":false,"_resolved":"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz","_integrity":"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=","_shasum":"8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc","_shrinkwrap":null,"bin":null,"_id":"source-map@0.5.7"},"type":"finalized-manifest"}}
0 Likes

(John Gee) #4

There is an open issue with installing global packages using sudo leaving behind files with the wrong ownership.

The short version is run this to fix the ownership, then try your install again:


sudo chown -R $(whoami) ~/.npm

The long version and canonical bug is: Global installs (sudo npm i -g) fail on Mac after 6.5 upgrade. Works fine after 6.4.1 downgrade.

0 Likes

(Stuart Updegrave) #5

Thanks, John. Sorry not to have followed up sooner.

1 Like