我尝试在我的 Angular 项目中运行 npm install 但导致错误:
error network tunneling socket could not be established, cause=read ECONNRESET
error network This is most likely not a problem with npm itself
error network and is related to network connectivity.
error network In most cases you are behind a proxy or have bad network settings.
我尝试像这样设置 npm 代理:
npm config set proxy http://myproxy
npm config set https-proxy https://myproxy
npm config set registry "http://registry.npmjs.org/"
我缺少什么或者如何运行 npm install?
最佳答案
在 npm 中设置“https-proxy”时,不应使用 'https' 而应使用 'http' 作为协议(protocol)。就这样做,
>npm config set https-proxy http://myproxy
关于angularjs - 如何使用 npm install 解决隧道套接字错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31308836/