1

So I am trying to update NodeJS and running into issues. First I tried using nvm to update. I installed a new version, and I can use the new version manually, but nvm ls still shows

    v0.6.14
current: v0.4.12
default -> 0.6 (-> v0.6.14)

nvm use on the new version doesn't do anything to change this message. nvm uninstall on the old version says I can't unstall the currently-active node version (isn't this what nvm use is supposed to do?).

So I tried installing the new version manually, following the steps in this guide.

cd $HOME/src
wget http://nodejs.org/dist/node-v0.4.11.tar.gz
tar -xzf node-v0.4.11.tar.gz
cd node-v0.4.11
alias python=python2.6
./configure --jobs=8 --prefix=$HOME
make && make install

This installs it, but the old node version is still being used by the shell.

What do I need to do to get rid of the old version of node, or at the very least get it to use the updated version (from either nvm or the shell, at this point anything works). Please excuse my general linux noobishness, I am still recovering from Windows use.

Kyeotic
  • 19,153
  • 10
  • 64
  • 125
  • I'm having a similar issue (http://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x) – Dominic Tancredi Jun 24 '12 at 13:59

4 Answers4

3

I was able to solve this by deleting the node file in $HOME/bin, and rerunning make install. I am still curious why make install didn't overwrite the old version, this seems like the natural thing to do, but its working now. I will hold out for a better answer before accepting my own.

Kyeotic
  • 19,153
  • 10
  • 64
  • 125
1

find out which nodes you are using:

where node in your cli

/Users/Nomadme/.nvm/versions/node/v6.3.1/bin/node
/usr/local/bin/node

and simply remove the old directory, since node can use several versions.

rm -r /Users/Nomadme/.nvm/versions/node/v6.3.1/bin/node

now when you do

Ganbayar Gansukh
  • 567
  • 5
  • 21
0

Delete node using following command:

rm /usr/local/bin/node

If you have other version installed, it will point to other version.

Rajeev Jayaswal
  • 949
  • 11
  • 20
0

Install nvm

  1. List node.js installatios using nvm: nvm ls
  2. High chance the version you tried to install is also listed
  3. Select the version to use using nvm nvm use