Ubuntu 9.04 上的 npm 安装问题
我正在尝试使用此处的命令安装 npm: http://howtonode.org/introduction-to -npm
具体来说,当我运行时:
curl http://npmjs.org/install.sh | sh
这是我得到的错误...
node cli.js cache clean
TypeError: Object #<an EventEmitter> has no method 'on'
at Object.<anonymous> (/home/sanjay/npm-1285345468/lib/utils/rm-rf.js:12:9)
at Module._compile (module:385:23)
at Module._loadScriptSync (module:397:16)
at Module.loadSync (module:296:10)
at loadModule (module:241:16)
at require (module:364:12)
at Object.<anonymous> (/home/sanjay/npm-1285345468/cli.js:14:10)
at Module._compile (module:385:23)
at module:413:20
at fs:52:23
make: *** [uninstall] Error 1
sanjay@sanjay-desktop:~$
不确定我是否在做一些愚蠢的事情,感谢任何帮助。谢谢你!
I’m trying to install npm using the commands from here: http://howtonode.org/introduction-to-npm
Specifically, when I run:
curl http://npmjs.org/install.sh | sh
This is the error I get...
node cli.js cache clean
TypeError: Object #<an EventEmitter> has no method 'on'
at Object.<anonymous> (/home/sanjay/npm-1285345468/lib/utils/rm-rf.js:12:9)
at Module._compile (module:385:23)
at Module._loadScriptSync (module:397:16)
at Module.loadSync (module:296:10)
at loadModule (module:241:16)
at require (module:364:12)
at Object.<anonymous> (/home/sanjay/npm-1285345468/cli.js:14:10)
at Module._compile (module:385:23)
at module:413:20
at fs:52:23
make: *** [uninstall] Error 1
sanjay@sanjay-desktop:~$
Not sure if I am doing something silly, any help is appreciated. Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
那篇文章已经过时了。
从 0.6.3 版本开始,npm 被捆绑到 node.js 中。
从 http://nodejs.org/ 安装最新版本的 Node,你也会获得 npm。
That article is quite outdated.
Since version 0.6.3, npm is bundled into node.js.
Install the latest version of node from http://nodejs.org/ and you'll get npm aswell.
我遇到了同样的错误 - 升级到最新的稳定版本使其消失,我很高兴 npm'ing。
I had the same error - upgrading to the latest stable version made it go away and I'm happily npm'ing.