While using the latest version of node,
sudo npm install -g n
I get the error:
sudo: npm: command not found
npm works without sudo when I use:
node: /usr/bin/node /usr/lib/node /usr/bin/X11/node /usr/local/node
I have still been getting the same error. I also looked at the /etc/sudoers file and the relevant line is:
This looks fine to me. How can I possibly get NPM working with the sudo command?