【问题标题】:installing karma through npm times out on phantomjs通过 npm 安装 karma 在 phantomjs 上超时
【发布时间】:2013-08-09 03:23:09
【问题描述】:

我正在尝试通过 npm 安装 karma,但它一直超时。我用 curl 下载了文件并手动安装了 phantomjs,但是当我尝试安装 karma 时,npm 仍然抛出错误。我尝试将文件复制到 npm 说它保存到的路径中,但这不起作用(运行安装也会删除我创建的目录)。

这就是我正在运行的:

sudo npm install -g karma

这是正在发生的事情:

> phantomjs@1.9.1-0 install /usr/local/lib/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js

Downloading http://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
Saving to /usr/local/lib/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/phantomjs/phantomjs-1.9.1-linux-x86_64.tar.bz2

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

我觉得奇怪的是,即使我在系统上手动安装了 phantomjs,它仍然在尝试安装它。为了使这项工作,我可以做些什么,我已经下载了文件,甚至安装了它,它似乎正在工作。出于某种原因,npm 就是不喜欢它。

【问题讨论】:

    标签: ubuntu npm phantomjs


    【解决方案1】:

    已修复.. 必须使用 sudo n stable 而不是 sudo n latest - 显然无法使用最新版本的 node.js 安装业力

    【讨论】:

      猜你喜欢
      • 2013-09-02
      • 2016-04-01
      • 1970-01-01
      • 2014-11-02
      • 1970-01-01
      • 2016-06-05
      • 1970-01-01
      • 2023-03-12
      • 2018-06-23
      相关资源
      最近更新 更多