Can't install NPM after installing Node on EC2 Linux instance?

Posted by frequent on Server Fault See other posts from Server Fault or by frequent
Published on 2012-09-22T00:54:00Z Indexed on 2012/09/22 3:39 UTC
Read the original article Hit count: 580

Filed under:
|
|
|
|

I'm trying my first attempt on getting a node server set up on an amazon ec2 linux instance.

I think I made it quite far. First problem I ran into was when trying to make Node the connection timed out after a while, so I need three attempts until I got this:

  LINK(target) /home/ec2-user/node/out/Release/node: Finished
  touch /home/ec2-user/node/out/Release/obj.target/node_dtrace_header.stamp
  touch /home/ec2-user/node/out/Release/obj.target/node_dtrace_provider.stamp
  touch /home/ec2-user/node/out/Release/obj.target/node_dtrace_ustack.stamp
  touch /home/ec2-user/node/out/Release/obj.target/node_etw.stamp
  make[1]: Leaving directory `/home/ec2-user/node/out'
  ln -fs out/Release/node node

Which tells me, "Node is done", although I'm not sure it is also working as it should.

Following this,this and this tutorial, I'm now stuck at installing npm.

I think I first cloned into the wrong folder, which always gave me error 127, but even if I'm doing this:

cd ~
git clone git://github.com/isaacs/npm.git
cd npm
sudo -s
PATH=/usr/local/bin:$PATH
make install

I'm still getting this:

#after cloning#
make[1]: Entering directory `/root/npm'
node cli.js install
bash: node: command not found
make[1]: *** [node_modules/.bin/ronn] Error 127
make[1]: Leaving directory `/root/npm'
make: *** [man/man3/start.3] Error 2

Question::
Since I'm pretty much a newby at everything I'm trying here, can someone please tell me what I'm doing wrong and how to get npm to install? Also, in case I cloned into the wrong folder, is there a way to remove the "false clone" or is this not written to disk until I call make install and I don't need to worry?

Thanks for helping out!

© Server Fault or respective owner

Related posts about linux

Related posts about amazon-ec2