npm i electron -g
[email protected] postinstall /usr/local/lib/node_modules/electron-prebuilt node install.js
然后就一直卡住了。
我的 node 已经升到最新版本了 6.9.2. OS 是 mac 。 github 中的 issue 上有同样的问题,但是没有人回复。。
![]() | 1 cbais7890 2016-12-15 23:20:04 +08:00 我记得安装时他会下载对应系统版本的包到电脑上, 一个好几百兆, 如果是卡在这里的话, 换个国内的源或许会好点 |
![]() | 2 acecode 2016-12-16 00:10:49 +08:00 |
![]() | 3 wxx199101046 2016-12-16 09:28:01 +08:00 ![]() 用 cnpm i 通常能解决这类问题 |
![]() | 5 pysama OP @wxx199101046 搞定了,太感谢你了。 |
![]() | 6 wxx199101046 2016-12-16 11:22:16 +08:00 @pysama My pleasure |
![]() | 7 HoHoibin 2017-04-17 22:29:07 +08:00 |
![]() | 10 DuXing 2017-12-30 14:56:21 +08:00 根据 @acecode 的提示,通过一下方式成功: > set ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron > npm i --registry=https://registry.npm.taobao.org |