I have just upgraded nodejs in my machine. I uninstalled the node version (the one in ubuntu repositories) that I had. Then I installed nvm and installed nodejs 4.2.2.
Everything goes without errors, but when I ran
npm --version it showed 2.14.7, then I decided to run:
sudo npm install -g npm in order to upgrade npm version, but when I checked it, it was still showing 2.14.7. So, I checked once again but using
sudo npm --version this time, and there was the latest 3.3.10 version.
Why this happens and how can I fix it?
Here is a screenshot:
I'm using Ubuntu 14.04.
adding wich command outputs
sistemas@ITAACO01:~$ which npm /home/sistemas/.nvm/versions/node/v4.2.2/bin/npm sistemas@ITAACO01:~$ sudo which npm /usr/local/bin/npm