美文网首页
更换 npm 与 yarn 的源

更换 npm 与 yarn 的源

作者: Tim_Lee | 来源:发表于2017-07-05 18:57 被阅读0次

明确指定源,还可以解决 npm install electron 卡在 node install.js 的问题

安装 Electron 的时候,如果卡在

...
> node install.js

是因为需要给 electron 明确的指定源。
因此修改 ·~/.npmrc`

$ vim ~/.npmrc

编辑内容,修改为:

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="https://npm.taobao.org/mirrors/electron/"

再次安装 Electron 即可成功。

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

相关文章

网友评论

      本文标题:更换 npm 与 yarn 的源

      本文链接:https://www.haomeiwen.com/subject/qynqhxtx.html