t2045817161 2017-09-01 05:05 采纳率: 50%
浏览 15701

npm ETIMEDOUT nodej安装第三方模块老是报错

C:\Users\v_xbingtan>npm install -g xml2js
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npm.taobao.org/xml2js failed, reason: connect ETIMEDOU
npm ERR! network This is a problem 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! A complete log of this run can be found in:
npm ERR! C:\Users\v_xbingtan\AppData\Roaming\npm-cache_logs\2017-09-01T02_41_59_830Z-debug.log

那些什么更换registry ,设置代理为null等都试过了,还是这样。到底是什么原因,如何去解决呢

日志里看不出什么 来,以下是日志文件:
0 info it worked if it ends with ok
1 verbose cli [ 'F:\develop\nodejs\node.exe',
1 verbose cli 'F:\develop\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'xml2js' ]
2 info using npm@5.3.0
3 info using node@v8.4.0
4 verbose npm-session 2e9c8d90d22e4948
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for xml2js@latest request to https://registry.npm.taobao.org/xml2js failed, reason: connect ETIMEDOUT 114.55.80.225:443
8 verbose type system
9 verbose stack FetchError: request to https://registry.npm.taobao.org/xml2js failed, reason: connect ETIMEDOUT 114.55.80.225:443
9 verbose stack at ClientRequest.req.on.err (F:\develop\nodejs\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\index.js:68:14)
9 verbose stack at emitOne (events.js:115:13)
9 verbose stack at ClientRequest.emit (events.js:210:7)
9 verbose stack at TLSSocket.socketErrorListener (_http_client.js:401:9)
9 verbose stack at emitOne (events.js:115:13)
9 verbose stack at TLSSocket.emit (events.js:210:7)
9 verbose stack at emitErrorNT (internal/streams/destroy.js:64:8)
9 verbose stack at _combinedTickCallback (internal/process/next_tick.js:138:11)
9 verbose stack at process._tickCallback (internal/process/next_tick.js:180:9)
10 verbose cwd C:\Users\v_xbingtan
11 verbose Windows_NT 6.1.7601
12 verbose argv "F:\develop\nodejs\node.exe" "F:\develop\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "xml2js"
13 verbose node v8.4.0
14 verbose npm v5.3.0
15 error code ETIMEDOUT
16 error errno ETIMEDOUT
17 error network request to https://registry.npm.taobao.org/xml2js failed, reason: connect ETIMEDOUT 114.55.80.225:443
18 error network This is a problem related to network connectivity.
18 error network In most cases you are behind a proxy or have bad network settings.
18 error network
18 error network If you are behind a proxy, please make sure that the
18 error network 'proxy' config is set properly. See: 'npm help config'
19 verbose exit [ 1, true ]

  • 写回答

1条回答 默认 最新

  • cloudyzhao 2017-09-01 06:41
    关注

    npm install -g npm 更新下试试

    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置