使用NPM更新包时出错

时间:2013-10-15 13:20:03

标签: node.js npm sails.js

当我尝试使用NPM更新特定包时出现问题。

我的命令:sudo npm update -g express

我的错误:

npm WARN package.json connect-form@0.2.1 No repository field.
npm WARN package.json ejs@0.6.1 No repository field.
npm WARN package.json kontroller@0.0.9-16 No repository field.
npm WARN package.json dateformat@1.0.2-1.2.3 No repository field.
npm WARN package.json ladder@0.0.0 No repository field.
npm WARN package.json progress@0.1.0 No repository field.
npm WARN package.json spawn-command@0.0.2 No repository field.
npm WARN package.json wizard@0.0.1 No repository field.
npm WARN package.json connect-redis@1.4.5 No repository field.
npm WARN package.json uglify-js@2.2.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm ERR! Error: EMFILE, open '/usr/local/lib/node_modules/sails/node_modules/asset-rack/node_modules/less/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "update" "-g" "express"
npm ERR! Error: EMFILE, too many open files
npm ERR!     at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:266:28)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/update.js:27:20
npm ERR!     at /usr/local/lib/node_modules/npm/lib/outdated.js:33:30
npm ERR!     at cb (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:48:11)
npm ERR!     at cb (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:48:11)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/outdated.js:100:22
npm ERR!     at cb (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:48:11)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/outdated.js:96:73
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:53:40
npm ERR!     at parseJson (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:82:32)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "update" "-g" "express"

/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:266
  log.error("cwd", process.cwd())
                           ^
Error: EMFILE, too many open files
    at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:266:28)
    at process.EventEmitter.emit (events.js:117:20)
    at process._fatalException (node.js:272:26)

问题在哪里,是否有更新我们所有包裹的命令?

安东尼

1 个答案:

答案 0 :(得分:0)

您可以通过删除node_modules文件夹,然后尝试node install来解决此问题。不确定吗?