【问题标题】:npm install doesn't work on Windows 10 even after setting proxy through npm config即使在通过 npm config 设置代理后,npm install 也无法在 Windows 10 上运行
【发布时间】:2016-09-26 08:36:00
【问题描述】:

我在执行 "npm install" 时收到以下错误。我已经手动设置了代理。有人可以帮我解决这个问题

D:\nodejs>npm config set http_proxy <http_proxy>

D:\nodejs>npm config set https_proxy <https_proxy>

D:\nodejs>npm install
npm ERR! Windows_NT 6.3.9600
npm ERR! argv"D:\\nodejs\\node.exe""D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect

npm ERR! network connect ETIMEDOUT 151.101.8.162:443
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR!     D:\nodejs\npm-debug.log

【问题讨论】:

标签: node.js windows proxy npm-install


【解决方案1】:

我没有足够的代表离开 cmets,但这里有各种可能有帮助的解决方案:

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

我会先确保 NPM 已更新。

【讨论】:

    【解决方案2】:

    这不是执行 npm config 的问题。 尝试更改您的组织密码并确保其中不包含 '#'。 使用新密码运行“npm config”,一切顺利。

    原因:我发现像 '@' 这样的符号会在 .npmrc 文件中自动编码(在您“run npm”时生成)配置命令)。 但是对于符号 '#',由于某种原因它没有被编码,因此我们得到了这个错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-22
      • 2018-04-12
      • 1970-01-01
      • 1970-01-01
      • 2016-02-07
      • 2017-06-05
      相关资源
      最近更新 更多