0

npm install在为 EmberAppKit 安装 nodejs 和 grunt cli 后运行时出现错误。有什么帮助吗?

$ npm install
npm http 200 https://registry.npmjs.org/estraverse
npm http 200 https://registry.npmjs.org/proto-list
phantomjs@1.9.6-0 install /home/.../node_modules/karma-phantomjs-launcher/node_modules/phantomjs

node install.js

setuid(): Operation not permitted
4

1 回答 1

0

我在 Ubuntu 14.10 上使用 npm 1.4.21setuid(): Operation not permitted运行相同。npm install我正在安装一个不同的程序(OOjs UI 不是 Ember 应用程序工具包),它有一个同样需要 p​​hantomjs 的 grunt 插件。

我认为如果您的路径中没有 phantomjs 或版本错误,那么 npm phantomjs 安装程序会尝试安装实际的 35+ MB phantomjs 二进制文件及其 5MB 节点包装器。某些东西试图成为 root 来进行安装,并且此setuid(0)调用失败并出现该错误。但:

  • npm install phantomjs 不报告红色 npm 错误,尽管因此故障而死
  • 当您重新运行 npm 时,它认为 phantomjs 安装正常;也许它只是检查包装器是否存在。

如果您的路径中已经有某个版本的 phantomjs,那么尽管安装失败,它可能会起作用。确保您拥有程序所需的 phantomjs 版本,如果没有单独安装该版本的 phantomjs。

于 2015-03-13T02:08:56.660 回答