EISDIR: illegal operation on a directory, open


(Bryce D) #1

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.


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

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


(Bryce D) #3

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


(Justin Grant) #4

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.


(system) #5

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.