Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Share On Stumbleupon
Contact us
Hide Buttons

Resolved – sudo npm command not found

Recently when I was trying to run my application on an ubuntu virtual server, I kept getting the error npm command not found even though I had installed nvm an node.
Based on my searches it seems like if you have installed nvm as a regular user, you wont be able to execute the nvm command with sudo.

The only painless way i could find to run nvm with sudo is by installing nvm using sudo itself through the following command

wget -qO- | sudo bash

Here’s the git repo that proposed the above command as a solution.

Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.