【发布时间】:2016-10-03 11:01:28
【问题描述】:
我在美国以外的地方度假,那里的连接速度很慢,npm install 给我带来了一些麻烦。
› npm config list
; cli configs
user-agent = "npm/3.7.3 node/v5.8.0 darwin x64"
; userconfig /Users/lfender/.npmrc
registry = "http://registry.npmjs.org/"
strict-ssl = false
; globalconfig /Users/lfender/.nvm/versions/node/v5.8.0/etc/npmrc
strict-ssl = false
; node bin location = /Users/lfender/.nvm/versions/node/v5.8.0/bin/node
; cwd = /Users/lfender/source/ag.js
; HOME = /Users/lfender
; "npm config ls -l" to show all defaults.
npm install --verbose
npm info retry will retry, error on last attempt: Error: connect ETIMEDOUT 151.101.56.162:443
我已尝试将注册表设置为http,但看起来它仍在尝试连接443 或ssl。
它会继续这样做并一遍又一遍地重试。我还可以尝试与注册表建立哪些通信?
即使连接到位于美国的企业 VPN,它仍然会失败。
npm ERR! network connect ETIMEDOUT 151.101.56.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 verb exit [ 1, true ]
我怀疑是 ISP 的问题
【问题讨论】:
-
您是否尝试过增加超时时间?例如,docs.npmjs.com/misc/config#fetch-retry-maxtimeout
-
很奇怪,连页面都超时了。当我访问其他网站时,它们加载得很好