Quantcast
Channel: npm forum - Topics tagged triaged
Viewing all articles
Browse latest Browse all 30

Global installs (sudo npm i -g) fail on Mac after 6.5 upgrade. Works fine after 6.4.1 downgrade.

$
0
0

@justingrant wrote:

What I Wanted to Do

Install a global package using sudo npm -g on my Mac running NPM 6.5

What Happened Instead

Every global install failed. Errors included many like this:

WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/npm-3e479054/node_modules/widest-line'

And finally one like this that stopped the install:

npm WARN enoent ENOENT: no such file or directory, open '/private/tmp/npm-31930-3d7b0f16/unpack-dda66812/node_modules/run-queue/package.json'

npm ERR! path /private/tmp/npm-31930-3d7b0f16/unpack-dda66812/node_modules/run-queue/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/private/tmp/npm-31930-3d7b0f16/unpack-dda66812/node_modules/run-queue/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Reproduction Steps

  1. Install node via downloadable Mac (Mojave 10.14.2) installer: https://nodejs.org/dist/v10.14.2/node-v10.14.2.pkg
  2. sudo npm install -g npm@6.4.1 to downgrade to working NPM
  3. sudo npm i -g serverless
  4. Works fine.
  5. sudo npm install -g npm@latest
  6. sudo npm i -g serverless
  7. FAIL!

Details

Here’s the NPM debug log shown on 6.5 when trying to re-install the serverless package (after it was successfully installed after the 6.4.1 downgrade, per the repro above).
2018-12-14T19_09_42_771Z-debug.log (292.4 KB)

I’m a new user on this forum so can’t post multiple log files, but before I successfully upgraded the serverless package (via downgrade to 6.4.1) I tried to install it earlier and it still failed, but in addition to the eventual error I also got a bunch of warnings like this:

WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/npm-3e479054/node_modules/widest-line'

Let me know if you need the logfile including these warnings and I can email it to you (or can attach here if I can get permission to do it).

BTW, here’s a support thread reporting the same problem: EISDIR: illegal operation on a directory, open

Platform Info

$ npm --versions
{ npm: '6.5.0',
  ares: '1.15.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.34.0',
  node: '10.14.2',
  openssl: '1.1.0j',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '6.8.275.32-node.45',
  zlib: '1.2.11' }

$ node -p process.platform
darwin

Posts: 30

Participants: 17

Read full topic


Viewing all articles
Browse latest Browse all 30

Trending Articles