Your situation
It seems that you have two different versions installed nodejs, perhaps one of them was installed from sources and one from the package manager, for example apt.
louis@louis:~$ node -v
v5.10.0
This returns the outdated version of nodejs that you installed, I recommend uninstalling it.
louis@louis:~$ nodejs -v
v6.2.1
nodejs, , , , Ubuntu nodejs .
sudo ln -s `which nodejs` /usr/bin/node
node.
nodejs vs node ubuntu 12.04
louis@louis:~$ npm -v
3.8.3
npm nodejs.
, , node nvm, /
nvm, script cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
, v5.0.x node, :
nvm install 5.0
:
nvm use 5.0
https://github.com/creationix/nvm#install-script