【问题标题】:cant install express.js on windows 10 using git bash无法使用 git bash 在 Windows 10 上安装 express.js
【发布时间】:2018-01-11 09:58:56
【问题描述】:

npm install -g express-generator

npm 错误!代码 ETIMEDOUT npm 错误! errno ETIMEDOUT npm 错误!网络 对https://registry.npmjs.org/express-generator 的请求失败, 原因:连接ETIMEDOUT 151.101.120.162:443 npm ERR!网络这是 与网络连接有关的问题。 npm 错误!网络在大多数 如果您使用代理服务器或网络设置错误。 npm 错误! 网络 npm 错误!网络 如果您使用代理,请确保 那个 npm 错误!网络“代理”配置设置正确。见:'npm 帮助配置'

npm 错误!可以在以下位置找到此运行的完整日志:

【问题讨论】:

    标签: javascript express


    【解决方案1】:

    如果您使用代理,您需要按如下方式配置您的 npm 配置:

    npm config set proxy http://<username>:<password>@<proxy-server-url>:<port>
    npm config set https-proxy http://<username>:<password>@<proxy-server-url>:<port>
    

    一旦你设置了这些,你的 npm install、npm i -g 等就可以正常工作了。

    您可以在 chrome 高级参数中找到您的代理设置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-23
      • 2019-12-18
      • 1970-01-01
      • 2021-10-04
      • 2019-12-03
      • 2019-10-11
      相关资源
      最近更新 更多