Reputation: 99
I have to install npm on a computer that doesn't have root privileges, I will have a number of errors due to missing dependencies. I attach the screen. Any idea? Thanks.
Upvotes: 3
Views: 5173
Reputation: 1500
Fancy Install (Unix)
There's a pretty robust install script at https://www.npmjs.com/install.sh. You can download that and run it.
Here's an example using curl:
curl -L https://npmjs.com/install.sh | sh
Upvotes: 0
Reputation: 525
From isaacs, one of the contributors of node.js:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install
curl https://www.npmjs.org/install.sh | sh
For more informations: https://gist.github.com/isaacs/579814
Upvotes: 3