Electron Forge 打包 MSI 安装包时 ETIMEDOUT 超时异常
Electron Windows About 1,475 words错误信息
connect ETIMEDOUT 20.205.243.166:443。
> Packaging application
> Packaging for x64 on win32
× Copying files
› connect ETIMEDOUT 20.205.243.166:443
× Preparing native dependencies
› connect ETIMEDOUT 20.205.243.166:443
× Finalizing package
› connect ETIMEDOUT 20.205.243.166:443
■ Running postPackage hook
■ Running preMake hook
■ Making distributables
■ Running postMake hook
An unhandled rejection has occurred inside Forge:
RequestError: connect ETIMEDOUT 20.205.243.166:443
at ClientRequest.<anonymous> (C:\Users\my\node_modules\got\dist\source\core\index.js:970:111)
at Object.onceWrapper (node:events:634:26)
at ClientRequest.emit (node:events:531:35)
at ClientRequest.emit (node:domain:489:12)
at origin.emit (C:\Users\my\node_modules\@szmarczak\http-timer\dist\source\index.js:43:20)
at emitErrorEvent (node:_http_client:105:11)
at TLSSocket.socketErrorListener (node:_http_client:518:5)
at TLSSocket.emit (node:events:519:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1637:16)
ELIFECYCLE Command failed with exit code 1.
原因
会从GitHub下载构建工具。
解决
使用镜像。在.npmrc中配置镜像。
electron_mirror=https://npmmirror.com/mirrors/electron/
Views: 6 · Posted: 2026-11-10
———         Thanks for Reading         ———
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...