[英]Node.js npm install module error
Here is my node and npm version: node -v v0.4.11 npm -v 1.0.27 这是我的节点和npm版本:node -v v0.4.11 npm -v 1.0.27
When I tried to install a module for example express, I get the following error: 当我尝试安装Express模块时,出现以下错误:
[root@localhost 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! <npm-@googlegroups.com>
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
Looks like your auth
is set to something that doesn't work. 看起来您的
auth
设置为无效的。 Not clear how that happened -- perhaps check your /home/kelvin/.npmrc for a stray config? 目前尚不清楚这是怎么发生的-也许检查/home/kelvin/.npmrc是否有误配置? Shooting in the dark a bit.
在黑暗中拍摄一点。 I would try npm mailing list if you don't find something in the rc.
如果您在rc中找不到任何内容,我会尝试npm邮件列表。
https://github.com/isaacs/npm/issues/1372#issuecomment-2036919 https://github.com/isaacs/npm/issues/1372#issuecomment-2036919
isaacs: "The master branch from git is often unstable. This is fixed in HEAD already." isaacs:“ git的master分支经常不稳定。此问题已在HEAD中修复。”
Solved after git pull, and make install. git pull后解决,并进行安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.