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

声明:本站所有文章和图片,如无特殊说明,均为原创发布,转载请注明出处。
随机推荐
JavaScript 触摸事件
Git 提示“warning: in the working copy of ' LF will be replaced by CRLF”
WP_Query 函数参数
WordPress 评论表单函数 comment_form()
JavaScript screen对象
WordPress 输入安全
表驱动方法
Node.js querystring 模块