错误信息:
npm ERR! RequestError: connect ETIMEDOUT 20.205.243.166:443
npm ERR! at ClientRequest.<anonymous> (D:\..\node_modules\got\source\request-as-event-emitter.js:178:14)
npm ERR! at Object.onceWrapper (node:events:628:26)
npm ERR! at ClientRequest.emit (node:events:525:35)
npm ERR! at origin.emit (D:\..\node_modules\@szmarczak\http-timer\source\index.js:37:11)
npm ERR! at TLSSocket.socketErrorListener (node:_http_client:494:9)
npm ERR! at TLSSocket.emit (node:events:513:28)
npm ERR! at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR! at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\..\AppData\Local\npm-cache\_logs\.._946Z-debug-0.log
解决方案:
配置npm镜像
npm config set registry https://registry.npmmirror.com
npm config set ELECTRON_MIRROR https://npmmirror.com/mirrors/electron/