2011-09-07 181 views
0

这是我的节点和NPM版本:-v v0.4.11 NPM -v 1.0.27Node.js的NPM安装模块错误

当我试图安装的模块。例如表达 节点,我得到的以下错误:

[[email protected] npm]# npm install express 
npm ERR! Error: First argument needs to be a number, array or string. 
npm ERR!  at new Buffer (buffer.js:156:15) 
npm ERR!  at regRequest (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:82:17) 
npm ERR!  at GET (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:211:3) 
npm ERR!  at get_ (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:121:3) 
npm ERR!  at /usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:46:10 
npm ERR!  at cb (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:37:9) 
npm ERR! Report this *entire* log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 
npm ERR! 
npm ERR! System Linux 2.6.40.3-0.fc15.i686.PAE 
npm ERR! command "node" "/usr/local/bin/npm" "install" "express" 
npm ERR! cwd /home/kelvin/Downloads/npm 
npm ERR! node -v v0.4.11 
npm ERR! npm -v 1.0.27 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /home/kelvin/Downloads/npm/npm-debug.log 
npm not ok 

回答

1

看起来你auth设置的东西,不能正常工作。不清楚这是怎么发生的 - 也许检查你的/home/kelvin/.npmrc是否有配置错误?在黑暗中拍摄一下。如果你没有在rc中找到某些东西,我会尝试npm邮件列表。

+0

Thiks乔希,我会检查文件。 – kelvinfix