Global install of lerna fails with 6.9.0

(Sven Cowart) #1

What I Wanted to Do

Install lerna globally via sudo npm i -g lerna.

What Happened Instead

I received the following error:

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/svencowart/.npm/_cacache/content-v2/sha512/29/f6'

npm ERR! cb() never called!

Reproduction Steps

Run sudo npm i -g lerna with npm@6.9.0.

Details

2019-04-04T16_53_38_897Z-debug.log (439 Bytes)

Platform Info

$ npm --versions
{ npm: '6.9.0',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.32.0',
  node: '8.11.3',
  openssl: '1.0.2o',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.1',
  v8: '6.2.414.54',
  zlib: '1.2.11' }
$ node -p process.platform
darwin
0 Likes

(John Gee) #3

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

(Sven Cowart) #4

I tried this but get the same error.

0 Likes

(Sven Cowart) #5

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

0 Likes