CentOS7-运维-npm install 问题{ Error: EACCES: permission denied, mkdir } - Go语言中文社区

CentOS7-运维-npm install 问题{ Error: EACCES: permission denied, mkdir }


  • Centos7,工程执行npm install,遇到的问题: 

  • 官网解释:

If npm was invoked with root privileges, then it will change the uid to the user account or uid specified by the user config, which defaults to nobody. Set the unsafe-perm flag to run scripts with root privileges.

  • 处理方案:
    • 在命令结尾加 --unsafe-perm: npm install --unsafe-perm
    • 或者在package.json中添加:
"config": {

    "unsafe-perm":true

}

 

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_42713970/article/details/86631184
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-03-01 20:01:48
  • 阅读 ( 1142 )
  • 分类:运维

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢