美文网首页我爱编程
npm安装phantomjs时卡住

npm安装phantomjs时卡住

作者: pointline | 来源:发表于2017-06-01 14:07 被阅读0次

很多童鞋在装一些项目时,如果用到phantomjs,那在执行npm install往往会卡住或者直接报错

因为在下载phantomjs时会到github上去下载,网络被墙的原因,下载速度超级慢.

估计等一哈晚上也下载不了,说不定下载到99% dong~ 报错 😄😄

解决办法有很多种

比如我的解决办法

本人环境mac+cnpm装了淘宝镜像

通过在.cnpmrc中配置phantomjs的CDNURL

cnpm config list //查看.cnpmrc的配置情况
cnpm config set phantomjs_cdnurl https://npm.taobao.org/dist/phantomjs //设置phantomjs CDNURL为淘宝镜像

现在就可以去执行cnpm install安装了

原文出自:https://pointline.github.io/2017/06/01/phantomjs

相关文章

网友评论

    本文标题:npm安装phantomjs时卡住

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