can't revert to older version of node, can't uninstall node, OSX

1k views Asked by At

Have installed node 0.12.2, but need to revert to 0.10.33 to run the applications I need to. I have tried installing 0.10.33 and switching versions using

set 0.10.33 to default with 'nvm alias default 0.10.33'

But node runs previous version (0.12.2) when started again.

I have tried uninstalling node via various methods, but each one has been blocked:

uninstall node 

"You must be in root to run this tool"

(I am the only user (with Admin access) on my machine I tried

cd /

then

uninstall node

But still got "You must be in root to run this tool"

Tried

sudo uninstall node

"Uninstall Failed... Reason: ErrorMissingBundle"

I may have installed node with Homebrew - it was a while back, can't quite remember. So tried:

brew uninstall node 

"Error: No such keg: /usr/local/Cellar/node"

Other information I can give:

which node

/usr/local/bin/node

I see node and npm in /usr/local/bin

Any help most appreciated - I'm not a command line expert, and fairly new at Node.

2

There are 2 answers

6
Craicerjack On

It looks like you might be using NVM (node version manager). If you are you can install different versions using

nvm install version_no 

and then you can switch versions using the command

nvm use version_no    

If you have not used NVM to install node you can uninstall node using the instructions in this answer - How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X).
Then if you need different versions of node I would recommend using NVM, which allows you to install and use different versions of node on the same system. https://github.com/creationix/nvm

2
Pierre Inglebert On

To switch from different node.js version with nvm just use nvm use 0.10.33