npm ERR! request to https://registry.npmjs.org/vue-resource failed, reason: self signed certificate in certificate chain

时间:2020-07-21 21:40:25   收藏:0   阅读:824

在Docker的Dockerfile中执行npm install时报错,如下:

Step 4/7 : RUN npm install
 ---> Running in 7ba60e3eab62
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/vue-resource failed, reason: self signed certificate in certificate chain

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-21T08_39_47_777Z-debug.log

原因

电脑使用Charles绑了代理,导致npm安装时出错。


解决方法

关掉电脑代理。


参考文章:

https://github.com/npm/npm/issues/6916

原文:https://www.cnblogs.com/kikisara/p/13355994.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!