sudo npm command not found ubuntu

Ubuntu NodeJs

I had trouble when try to install less module for nodejs. First I try this:

npm install -g less

But got an error "sudo npm command not found". So I find a solution:

sudo $(which npm) install -g less

Comments

Login with GitHub to leave a comments