侧边栏壁纸
博主头像
iColak's Blog

人生来来往往,来日并不方长

  • 累计撰写 106 篇文章
  • 累计创建 31 个标签
  • 累计收到 381 条评论

目 录CONTENT

文章目录

关于electron报read ECONNRESET解决方案

苏维歌
2022-06-06 / 0 评论 / 0 点赞 / 19 阅读 / 0 字 / 正在检测是否收录...
温馨提示:
本文最后更新于2024-07-05,若内容或图片失效,请留言反馈。 部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

问题

D:\APP\gui>npm install --save-dev electron
npm ERR! code 1
npm ERR! path D:\APP\gui\node_modules\electron
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm ERR! RequestError: read ECONNRESET
npm ERR!     at ClientRequest. (D:\APP\gui\node_modules\got\source\request-as-event-emitt
er.js:178:14)
npm ERR!     at Object.onceWrapper (node:events:510:26)
npm ERR!     at ClientRequest.emit (node:events:402:35)
npm ERR!     at ClientRequest.origin.emit (D:\APP\gui\node_modules\@szmarczak\http-timer\source\inde
x.js:37:11)
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:447:9)
npm ERR!     at TLSSocket.emit (node:events:390:28)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21)

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

D:\APP\gui>npm install --save-dev electron
npm ERR! code 3221225786
npm ERR! path D:\APP\gui\node_modules\electron
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm ERR! ^C

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

解决方法

设置ELECTRON_MIRROR地址

npm config set ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/

安装

npm install --save-dev electron
0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin
  3. QQ打赏

    qrcode qq

评论区