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 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)