Eletron 安装时卡在 node install.js

Eletron 安装时卡在 node install.js 咋办?

  不知道大家安装 Eletron 的时候有没有遇到卡在 node install.js 这种状况?开了 VPN 还是无动于衷,换了 taobao 的NPM源也是没有鸟用。

  搜了好久的资料,终于找到一个有用的解决办法。如下:

  1、安装nrm,切换到 taobao的源。
  2、编辑 ~/.npmrc 这个文件, 加入下面内容

1
2
3
4
registry=https://registry.npm.taobao.org
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
phantomjs_cdnurl=http://npm.taobao.org/mirrors/phantomjs
ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/
0%