npm: 权限阻止修复
生活随笔
收集整理的这篇文章主要介绍了
npm: 权限阻止修复
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
在使用 npm install 时,总提示:
Error: EACCES: permission denied
今天通过这个命令设置了权限解决了问题:
sudo chown -R $(whoami) ~/.npm
方法来自:https://stackoverflow.com/a/51923345/1185971
---
在安装 node-gyp 时提示:
Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/baidu/.npm/_cacache/tmp'
npm ERR! cb() never called!
采用上文方法处理后,又提示:
Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
于是,又执行了一个:
sudo chown -R $(whoami) /usr/local/lib/node_modules
解决~
转载于:https://www.cnblogs.com/duxing/p/10521743.html
总结
以上是生活随笔为你收集整理的npm: 权限阻止修复的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 为什么用B+树做索引MySQL存储引擎简
- 下一篇: Shell命令-关机重启及注销之logo