我正在尝试升级 npm:
npm install -g npm
但我不断收到数百次类似的警告:
warn tar EISDIR: illegal operation on a directory, open '/tmp/npm-4154-cadf3470/unpack-87786b4c/bin/node-gyp-bin'
我的堆栈跟踪以错误结束,表明找不到文件:
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.
还有人遇到类似的问题吗?
最佳答案
不得不uninstall node completely并使用brew重新安装:
brew install node
关于node.js - npm install : illegal operation on a directory 出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53908432/