1. 卡在 node install.js

这句命令的install.jselectron这个包里的,里面的下载是依赖于electron-download这个模块。
在github上面,electron-download这个包里有如下标注:

  1. ## Electron Mirror of China
  2. ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"
  3. ## or for a local mirror
  4. ELECTRON_MIRROR="https://10.1.2.105/"
  5. ELECTRON_CUSTOM_DIR="our/internal/filePath"

所以解决的方法就是在~/.npmrc里做如下设置,

  1. electron_mirror="https://npm.taobao.org/mirrors/electron/"

参考: eletron安装卡在 node install.js