NPM not found when using NVM

I fixed this by doing this command:

$ command -v npm

and then reopen the shell window.


If you run NVM-Windows, don't forget to run nvm on. (this solve the problem as title for me.)


I found out that this was a conflict with a previous versions of npm that have not been removed properly despite a apt-get remove node.

I solved it by reinstalling npm from scratch:

rm -R ~/.npm ~/.nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
nvm install node

I found the solution here.

Tags:

Node.Js

Npm

Nvm