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 readline 模块
JavaScript 中 0.1 加 0.2 不等于 0.3 的原因和解决方法
Flame 插件
WordPress 常用函数 / sanitize_user
JavaScript 流式传输数据 SSE (Server-Sent Events)
WordPress 分类添加自定义字段
JavaScript 操作表单
Node.js fs 文件系统模块