【问题标题】:how to get around tunneling socket error with npm install?如何使用 npm install 解决隧道套接字错误?
【发布时间】:2015-09-27 07:37:51
【问题描述】:

我正在尝试在我的 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?

【问题讨论】:

标签: angularjs node.js windows npm


【解决方案1】:

在 npm 中设置 "https-proxy" 时,不应使用 'https' 而应使用 'http' 作为协议。就这样吧,

>npm config set https-proxy http://myproxy

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-14
    • 2014-11-21
    • 2016-04-19
    • 1970-01-01
    • 2023-03-13
    • 2019-01-02
    • 2013-06-23
    • 1970-01-01
    相关资源
    最近更新 更多