Closed
Description
When sudoing node, 'command not found' is issued, because on most systems PATH is reset on sudo, for security reasons.
This makes 'sudo node' not work anymore.
Simply adding the following line at the end of the nvm.sh script, would fix it:
alias node='$NVM_BIN/node'
//possibly adding an alias for npm as well?
This assumes .bashrc for user contains these 3 lines:
. ~/.nvm/nvm.sh
enable aliases in sudo
alias sudo='sudo '