npm ERR! code ERR_SOCKET_TIMEOUT

npm install vue-cli时,报错如下图。

D:\MyWorkSpace\vue_project>npm install vue-cli
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! request to https://mirrors.huaweicloud.com/repository/npm/rxjs failed, reason: Socket timeout

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xiaoyao\AppData\Local\npm-cache\_logs\2021-01-18T06_09_47_430Z-debug.log

查看log后,发现在request到rxjs端口超时,也有可能当时网络不稳定断掉了。

972 verbose type system
973 verbose stack FetchError: request to https://mirrors.huaweicloud.com/repository/npm/rxjs failed, reason: Socket timeout
973 verbose stack     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:97:14)
973 verbose stack     at ClientRequest.emit (node:events:376:20)
973 verbose stack     at TLSSocket.socketErrorListener (node:_http_client:474:9)
973 verbose stack     at TLSSocket.emit (node:events:388:22)
973 verbose stack     at emitErrorNT (node:internal/streams/destroy:188:8)
973 verbose stack     at emitErrorCloseNT (node:internal/streams/destroy:153:3)
973 verbose stack     at processTicksAndRejections (node:internal/process/task_queues:80:21)
974 verbose cwd D:\MyWorkSpace\vue_project
975 verbose Windows_NT 10.0.19042
976 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "vue-cli"
977 verbose node v15.5.0
978 verbose npm  v7.3.0
979 error code ERR_SOCKET_TIMEOUT
980 error errno ERR_SOCKET_TIMEOUT
981 error request to https://mirrors.huaweicloud.com/repository/npm/rxjs failed, reason: Socket timeout
982 verbose exit 1

先执行一次npm install rxjs,再次执行npm install vue-cli

  • 11
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值