简体   繁体   中英

Node.js: How to install NPM

I have cygwin and node.exe (0.5.7) installed on my window XP.

When I git clone npm(1.0.30), cd npm, then "make install" , there are lots of node_modules cloning.

But it stopped when execute "node cli.js install git+https://github.com/isaac/ronnjs.git" .

The following is my npm-debug.log .

info it worked if it ends with ok

verbose cli [ 'E:\\node\\node.exe',
verbose cli 'e:\\github\\npm\\cli.js',
verbose cli 'cache',
verbose cli 'clean' ]
info using npm@1.0.30
info using node@v0.5.7
verbose config file C:\\Documents and Settings\\zhangchiqing.npmrc
verbose config file E:\\etc\\npmrc
ERR! prefix directory not found
ERR! Error: ENOENT, ɹ ɡ
ERR! 'E:'
ERR! Report this entire log at:
ERR! http://github.com/isaacs/npm/issues
ERR! or email it to:
ERR! npm-@googlegroups.com
ERR!
ERR! System Windows_NT 5.1.2600
ERR! command "E:\\node\\node.exe" "e:\\github\\npm\\cli.js" "cache" "clean"
ERR! cwd E:\\github\\npm
ERR! node -v v0.5.7
ERR! npm -v 1.0.30
verbose exit [ 1, true ]

This works in Ubuntu. You have to use older version of node.

sudo apt-get install -y g++ libssl-dev apache2-utils curl git-core
git clone git://github.com/joyent/node.git
cd node
git checkout v0.4.11
./configure
make
sudo make install
node -v
curl https://npmjs.org/install.sh | sudo sh
npm -v

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM