Recently working with NodeJS ect. I installed quite different packages, for different tutorials + projects.
I finally ended up with this kind of configuration:
louis@louis:~$ node -v
louis@louis:~$ nodejs -v
louis@louis:~$ npm -v
Seems you have two different versions of
nodejs installed, possibly one was installed from sources and one from package manager like
louis@louis:~$ node -v v5.10.0
This returns older version of nodejs that you installed, I recommend you to remove it.
louis@louis:~$ nodejs -v v6.2.1
This returns the latest version of
nodejs installed, possibly you installed it using package manager, I remember in
Ubuntu it comes by
nodejs executable name.
I suggest you to create link like this
sudo ln -s `which nodejs` /usr/bin/node
so it will be available using
node command also.
louis@louis:~$ npm -v 3.8.3
This is just version of your
npm program and has nothing to do with
Uninstall all versions that you have and install
nvm to switch between old/new versions easily
To install or update nvm, you can use the install script using cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
To download, compile, and install the latest v5.0.x release of node, do this:
nvm install 5.0