问题
I'm trying to install electron via npm and I get this error : How can I solve it?
回答1:
You can set custom mirrors to download electron from a seperate mirror. Just add this before npm install
, or inside the hooks somewhere.
ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"
I've always used this because github were extremely slow for electron release downloads even on the servers.
回答2:
Might be a bad internet connection or a proxy issue. You may want to try to remove your proxy:
npm config rm proxy
npm config rm https-proxy
回答3:
It's better to install electron
globally.
You can try
npm i electron -g --verbose
also update your npm before install electron
npm i -g npm
来源:https://stackoverflow.com/questions/52510812/electron-installing-abort-econnreset