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

声明:本站所有文章和图片,如无特殊说明,均为原创发布,转载请注明出处。
随机推荐
在 HTML 中引入 CSS
WordPress 后台添加菜单
ES6 Promise 和 async/await 教程
JavaScript 流程控制语句
Node.js fs 文件系统模块
JavaScript 原生拖放
WordPress 添加文章自定义字段
Node.js os 模块