I just install node.js 4.4.4 from NVM on ubuntu 14.04.
npm --version
give me 2.15.1
sudo npm --version
give me sudo: npm: command not found
I first tried to solved my problem with that Q&A but as I installed node with NVM then node is install into ~/.nvm/ instead of the default location ...
Note whereis npm
give me npm:
with nothing after
EDIT
I've just read that NVM should remove sudo
requirement in node process. But when I try npm install pm2 -g
I receive npm ERR! Please try running this command again as root/Administrator.
which doesn't make sens ...