set GLOBAL_AGENT_HTTP_PROXY=http://192.168.0.111:808
set GLOBAL_AGENT_HTTPS_PROXY=https://192.168.0.111:808
npm install -g npm@latest
npm config set registry https://registry.npmmirror.com
npm config set ELECTRON_MIRROR https://npmmirror.com/mirrors/electron/
如果出現“`ELECTRON_MIRROR` is not a valid npm option”的錯誤提示,可以直接修改配置文件,C:\Users\[USER_NAME]\.npmrc。
npm install electron