美文网首页
node install.js

node install.js

作者: 不在隔壁的王二叔 | 来源:发表于2020-03-03 20:40 被阅读0次

(node:21368) UnhandledPromiseRejectionWarning: RequestError: connect ETIMEDOUT

如果你想我一样, 上网需要经过一个代理, npm install electron -g的时候, npm设置的proxy不能生效,导致安装出错。

解决办法是:

set ELECTRON_GET_USE_PROXY=代理

因为electron的安装中用到一个自己的下载程序, 而那个下载程序不会从npm中继承代理设置。

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

相关文章

网友评论

      本文标题:node install.js

      本文链接:https://www.haomeiwen.com/subject/czrllhtx.html