2011年8月20日土曜日

Node Package Manager(npm)のインストール

前回に続きnpmをインストールします

shin@debian:~/dev$ curl http://npmjs.org/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3927  100  3927    0     0   4464      0 --:--:-- --:--:-- --:--:--  9350
fetching: http://registry.npmjs.org/npm/-/npm-1.0.26.tgz
0.4.11
1.0.26
cleanup prefix=/home/shin/local/node

This script will find and eliminate any shims, symbolic
links, and other cruft that was installed by npm 0.x.

Is this OK? enter 'yes' or 'no' 
yes

All clean!
! [ -d .git ] || git submodule update --init --recursive
node cli.js rm npm -g -f
node cli.js cache clean
node cli.js install -g -f
/home/shin/local/node/bin/npm -> /home/shin/local/node/lib/node_modules/npm/bin/npm.js
/home/shin/local/node/bin/npm_g -> /home/shin/local/node/lib/node_modules/npm/bin/npm.js
/home/shin/local/node/bin/npm-g -> /home/shin/local/node/lib/node_modules/npm/bin/npm.js
npm@1.0.26 /home/shin/local/node/lib/node_modules/npm 

いい感じにインストールできました
早速試してみます

shin@debian:~/dev$ npm install express
express@2.4.5 ./node_modules/express 
├── mime@1.2.2
├── connect@1.6.2
└── qs@0.3.1

うまくインストール出来たようです

0 件のコメント:

コメントを投稿