npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

EISDIR: illegal operation on a directory, open

NPM was working yesterday. I did a global NPM update this morning (6.5.0) and how I’m getting the following message for every npm global install I do (tried nom, @angular/cli, typescript etc):

WARN tar EISDIR: illegal operation on a directory, open ‘{{package}}’

Using a Mac.


More details on the error:

npm ERR! path /private/tmp/npm-625-976e0054/unpack-b5be3956/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-625-976e0054/unpack-b5be3956/node_modules/run-queue/package.json’

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent


As an FYI I re-installed node which downgraded rpm to 6.4.1 and that fixed the issue.


Same here. Global NPM installs are now failing after NPM upgrade 6.4.1->6.5 on my Mac. I didn’t need to re-install Node to solve the problem. Instead I just ran sudo npm install -g npm@6.4.1 to downgrade NPM, and then subsequent global installs work fine (e.g. sudo npm i -g serverless).

I filed a bug report here: Global installs (sudo npm i -g) fail on Mac after 6.5 upgrade. Works fine after 6.4.1 downgrade.