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?
必须完全卸载节点并使用brew重新安装:
brew install node
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.