Johnny Metz
Johnny Metz

Reputation: 5985

Problem with npm install: illegal operation on a directory

I'm trying to upgrade npm:

npm install -g npm

But I keep getting a similar warning hundreds of times:

warn tar EISDIR: illegal operation on a directory, open '/tmp/npm-4154-cadf3470/unpack-87786b4c/bin/node-gyp-bin'

My stacktrace ends with a error which indicates a file can't be found:

npm ERR! path /private/tmp/npm-4154-cadf3470/unpack-87786b4c/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-4154-cadf3470/unpack-87786b4c/node_modules/run-queue/package.json'
npm ERR! enoent This is related to npm not being able to find a file.

Is anyone else having a similar problem?

Upvotes: 1

Views: 2396

Answers (1)

Johnny Metz
Johnny Metz

Reputation: 5985

Had to uninstall node completely and reinstall using brew:

brew install node

Upvotes: 2

Related Questions