1

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?

Johnny Metz
  • 5,977
  • 18
  • 82
  • 146

1 Answers1

2

Had to uninstall node completely and reinstall using brew:

brew install node
Johnny Metz
  • 5,977
  • 18
  • 82
  • 146
  • Good solution! For what it's worth, I've found I had fewer issues w/ `npm` when I've used `nvm` to install `node`. https://github.com/creationix/nvm – therobinkim Feb 20 '19 at 16:23