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

声明:本站所有文章和图片,如无特殊说明,均为原创发布。商业转载请联系作者获得授权,非商业转载请注明出处。
随机推荐
Node.js path 模块
WordPress 使用 shortcode() 增加编辑器功能
冒泡法排序
Git 放弃本地修改,强制和之前的某次提交同步
WordPress 数据库表结构
JavaScript 触摸事件
JavaScript DOM 文档对象模型
JavaScript 对象