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

声明:本站所有文章和图片,如无特殊说明,均为原创发布,转载请注明出处。
随机推荐
WordPress 分类添加自定义字段
CSS 盒模型
MySQL 批量修改时间
JavaScript 字符串详细介绍
medium-zoom,一款 JavaScript 图片缩放库
JavaScript 使用剪切板
Git push 错误:Updates were rejected because the remote contains work that you do not have locally
JWT 存储在 Cookie 和 Web Storage 的区别