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 try­ing to run my appli­ca­tion on an ubuntu vir­tual server, I kept get­ting 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 reg­u­lar user, you wont be able to exe­cute the nvm com­mand with sudo.

The only pain­less way i could find to run nvm with sudo is by installing nvm using sudo itself through the fol­low­ing command

wget -qO- | sudo bash

Here’s the git repo that pro­posed the above com­mand as a solution.

Ryan Sukale

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