This happened to me as well.
node -v => 0.10.2
nodejs -v => 5.5.0
The issue was that I had installed node from source some time ago. Running
which node
always pointed to this local installation. Also,
echo NODE_PATH
pointed to the local installation.
deleting the directory with the source install didn't help. It just broke the node command. In the end, unsetting the NODE_PATH environmental variable and purging then reinstalling nodejs did the trick.
unset NODE_PATH
sudo apt-get --purge remove nodejs
sudo apt-get install nodejs
After this,
node -v => 5.5.0
and npm install started to work for packages depending on Node => 5.0.