求助,刚入手,安装express总是出错.
发布于 2年前 作者 hanluner 683 次浏览

错误log如下: npm ERR! tar.unpack error reading /Users/hanluner/.npm/mkdirp/0.3.3/package.tgz npm ERR! tar.unpack error reading /Users/hanluner/.npm/github-flavored-markdown/1.0.1/package.tgz npm ERR! tar.unpack error reading /Users/hanluner/.npm/cookie/0.0.3/package.tgz npm ERR! tar.unpack error reading /Users/hanluner/.npm/crc/0.2.0/package.tgz npm ERR! tar.unpack error reading /Users/hanluner/.npm/connect/2.3.4/package.tgz npm ERR! Error: EMFILE, open ‘/usr/local/lib/node_modules/express/node_modules/send/node_modules/supertest/node_modules/superagent/node_modules/formidable/.travis.yml’ 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.3.0 npm ERR! command “node” “/usr/local/bin/npm” “install” "-g" “express” npm ERR! cwd /Users/hanluner/code/nodeprj npm ERR! node -v v0.10.9 npm ERR! npm -v 1.2.24 npm ERR! path /usr/local/lib/node_modules/express/node_modules/send/node_modules/supertest/node_modules/superagent/node_modules/formidable/.travis.yml npm ERR! code EMFILE npm ERR! errno 20 npm ERR! Error: EMFILE, open ‘/usr/local/lib/node_modules/express/node_modules/connect/node_modules/send/node_modules/supertest/node_modules/superagent/lib/node/utils.js’ 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.3.0 npm ERR! command “node” “/usr/local/bin/npm” “install” "-g" “express” npm ERR! cwd /Users/hanluner/code/nodeprj npm ERR! node -v v0.10.9 npm ERR! npm -v 1.2.24 npm ERR! path /usr/local/lib/node_modules/express/node_modules/connect/node_modules/send/node_modules/supertest/node_modules/superagent/lib/node/utils.js npm ERR! code EMFILE npm ERR! errno 20 npm http 304 https://registry.npmjs.org/connect/2.7.0 npm http GET https://registry.npmjs.org/burrito npm http 200 https://registry.npmjs.org/concat-stream/-/concat-stream-0.1.1.tgz npm http GET https://registry.npmjs.org/request/-/request-2.11.4.tgz npm ERR! Error: EMFILE, open ‘/usr/local/lib/node_modules/express/node_modules/mocha/node_modules/jade/node_modules/less/test/browser/runner-main.js’ 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.3.0 npm ERR! command “node” “/usr/local/bin/npm” “install” "-g" “express” npm ERR! cwd /Users/hanluner/code/nodeprj npm ERR! node -v v0.10.9 npm ERR! npm -v 1.2.24 npm ERR! path /usr/local/lib/node_modules/express/node_modules/mocha/node_modules/jade/node_modules/less/test/browser/runner-main.js npm ERR! code EMFILE npm ERR! errno 20 npm ERR! tar.unpack error reading /Users/hanluner/.npm/deep-is/0.1.2/package.tgz npm http GET https://registry.npmjs.org/tape npm ERR! tar.unpack error reading /Users/hanluner/.npm/cookie-signature/0.0.1/package.tgz npm ERR! tar.unpack error reading /Users/hanluner/.npm/cookie/0.0.5/package.tgz npm ERR! Error: EMFILE, open ‘/Users/hanluner/tmp/npm-6107/1370333391555-0.3254087553359568/package/test/idClassShortcut.coffee’ 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.3.0 npm ERR! command “node” “/usr/local/bin/npm” “install” "-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)

2 回复

linux 服务,全局安装用的是root 用户没?

用了,应该ulimit -a中的open files的数量限制,可是依然没有改掉数值.

回到顶部