gyp WARN EACCES user "nobody" does not have permission to access the dev dir

安装包的时候提示如下:

gyp WARN EACCES user "nobody" does not have permission to access the dev dir

或者

gyp WARN EACCES user "root" does not have permission to access the dev dir


解决方法:

npm install xxxx -g --unsafe-perm 


有时候可以先执行:

npm cache clean --force


参考:

https://javascript.net.cn/article?id=657

声明:本站所有文章和图片,如无特殊说明,均为原创发布,转载请注明出处。
随机推荐
JWT 存储在 Cookie 和 Web Storage 的区别
ES6 Promise 和 async/await 教程
JavaScript 引用类型
JavaScript 使用 html2canvas 生成图片
WordPress 侧边栏小工具
JavaScript 事件处理程序
JavaScript 中 0.1 加 0.2 不等于 0.3 的原因和解决方法
Node.js test 模块