首页 > 用 npm install -g karma 安装 Karma 报错:events.js:72 throw er

用 npm install -g karma 安装 Karma 报错:events.js:72 throw er

安装 Karma:

npm install -g karma

进行到下面这步的时候,报错了:

> phantomjs@1.9.7-1 install /usr/local/share/npm/lib/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js

Downloading http://cdn.bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-macosx.zip
Saving to /var/folders/gv/f4rk8mb942z6z4w712q7w9r00000gn/T/phantomjs/phantomjs-1.9.7-macosx.zip

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect ETIMEDOUT
    at errnoException (net.js:901:11)
    at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR! weird error 8
npm ERR! not ok code 0

网络连接超时(ETIMEDOUT)。访问 bitbucket 等国外网站,特别是技术站时,请注意使用代理。


遇到同样的错误,确实是因为网站被墙导致的连接超时,用VPN代理后一切正常

【热门文章】
【热门文章】