electron 全局安装的时候卡在 postinstall 了,有遇到的同学不?

2016 年 12 月 15 日
 pysama

npm i electron -g

electron-prebuilt@1.4.12 postinstall /usr/local/lib/node_modules/electron-prebuilt
node install.js

然后就一直卡住了。

我的 node 已经升到最新版本了 6.9.2. OS 是 mac 。 github 中的 issue 上有同样的问题,但是没有人回复。。

14364 次点击
所在节点    Node.js
10 条回复
cbais7890
2016 年 12 月 15 日
我记得安装时他会下载对应系统版本的包到电脑上, 一个好几百兆, 如果是卡在这里的话, 换个国内的源或许会好点
acecode
2016 年 12 月 16 日
加一个淘宝镜像设置试试

ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ npm install -g electron
wxx199101046
2016 年 12 月 16 日
用 cnpm i 通常能解决这类问题
pysama
2016 年 12 月 16 日
@acecode 试过了,不行。谢谢
@cbais7890 我一直使用 tb 的镜像
pysama
2016 年 12 月 16 日
@wxx199101046 搞定了,太感谢你了。
wxx199101046
2016 年 12 月 16 日
@pysama My pleasure
nullsuperman
2017 年 4 月 17 日
@pysama
@wxx199101046 请问是怎么解决的 我用了 cnpm I electron -g 还是一样卡在那里
pysama
2017 年 5 月 11 日
@HoHoibin 我前面说了, 用 cnpm 搞定的
nullsuperman
2017 年 5 月 12 日
@pysama 嗯,已经解决了,最后用了 Proxifier 全局代理后就好了。
DuXing
2017 年 12 月 30 日
根据 @acecode 的提示,通过一下方式成功:
> set ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron
> npm i --registry=https://registry.npm.taobao.org

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/327952

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX