1

I have an old version of NPM and NodeJS installed on my AWS server. I really just need bower to work to install a module. npm version is 1.1.0-2. Node version is 0.6.8.

sudo npm install -g npm

Results in:

npm ERR! System Linux 3.10.42-52.145.amzn1.x86_64
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "npm"
npm ERR! cwd /home/ec2-user/node-v0.10.33-linux-x64
npm ERR! node -v v0.6.8
npm ERR! npm -v 1.1.0-2
npm ERR! message failed to fetch from registry: npm

Also tried NodeJS from source. README says use the usual ./configure, make, make install. Caveat: no configure script. :-/

Ready to throw my hands up.

kiss-o-matic
  • 1,111
  • 16
  • 32
  • 1
    possible duplicate of [How can I update NodeJS and Npm for the next versions?](http://stackoverflow.com/questions/6237295/how-can-i-update-nodejs-and-npm-for-the-next-versions) – Matthew James Davis Nov 14 '14 at 22:37
  • Sort of but none of those are working. I actually got the source to compile (I had downloaded the binaries by mistake). So hopefully that will work. – kiss-o-matic Nov 14 '14 at 22:55

2 Answers2

2

Please try running the following in your terminal:

curl https://www.npmjs.org/install.sh | sh
Matthew James Davis
  • 12,134
  • 7
  • 61
  • 90
  • I think we have a chicken & the egg scenario. It downloads, but outdates this: You are using an outdated and unsupported version of node (v0.6.8). Please update node and try again. – kiss-o-matic Nov 14 '14 at 22:53
  • Is uninstalling and reinstalling node an option? Sounds like you're on a very old version of node. – Matthew James Davis Nov 14 '14 at 23:41
  • I didn't see anything that looked like Node in yum. (Disclaimer: Not a yum user). Installing from source did sort it out though -- thanks. – kiss-o-matic Nov 15 '14 at 00:07
0

Okay, the source code eventually did work. I had downloaded the binaries by mistake. (Odd that they come w/ a README telling you how to build the source code).

Hoping anyone else looking to upgrade can learn something from this.

Anywho, I'm good on this for now. Thanks for the input.

kiss-o-matic
  • 1,111
  • 16
  • 32