开发者

npm doesn't install modules under ubuntu 10.04

I installed NPM without problems but whenever I try to install a module the terminal just hangs and does nothing (at least it seems like it does not开发者_StackOverflow社区hing ...)

I waited for 5 mins but nothing changes.

npm doesn't install modules under ubuntu 10.04

edit

using node version 0.5.4-pre and npm 1.0.23


Best way to get around this is:

1) Remove your node directory

$ rm -rf node

2) get branch 0.4

$ git clone -b v0.4 git://github.com/joyent/node.git

3) Compile and install it (sudo)

$ sudo su -
$ cd node
$ make clean
$ ./configure
$ make -j
$ sudo su -
# make install

4) Re-download & install npm, this is important!

# curl http://npmjs.org/install.sh | sh

5) Exit sudo, rebuild your search index and install your module

# exit
$ npm search
$ npm install mysql


downgraded to node 0.4.10 and now everything is working alright.


The same problem was solved after reinstall nodejs and npm. Then I write simple installation shell script to automatic installation with modules. And as i know it's not recomended to run node from root.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜