前言
今天重新拉一下项目里node_module依赖的时候,崩了。虽然用了一个多季度的MacOS,整个开发环也基本没啥大问题。但还是出现了以下的问题。
error /Users/dextercai/project/sct_helper/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /Users/dextercai/project/sct_helper/node_modules/electron
Output:
RequestError: read ETIMEDOUT
at ClientRequest.<anonymous> (/Users/dextercai/project/sct_helper/node_modules/got/source/request-as-event-emitter.js:178:14)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:327:22)
at ClientRequest.origin.emit (/Users/dextercai/project/sct_helper/node_modules/@szmarczak/http-timer/source/index.js:37:11)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:315:20)
快速解决
代理太慢,换国内源。分别需要换Yarn/npm以及electron。
export ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/
npm config set registry http://registry.npm.taobao.org/
//npm config set registry https://registry.npmjs.org/
yarn config set registry https://registry.npm.taobao.org
//yarn config set registry https://registry.yarnpkg.com
本文标题:electron拉取问题:read ETIMEDOUT
本文连接:https://blog.dextercai.com/archives/176.html
除另行说明,本站文字内容采用创作共用版权 CC-BY-NC-ND 4.0 许可协议,版权归本人所有。
除另行说明,本站图片内容版权归本人所有,未经许可前,严禁以任何形式的使用。
即日起关闭全站评论区,您可以通过关于页面的电邮地址和我取得联系,谢谢