node and sudo: now kiss
Getting permission errors when installing a module?
Are ‘sudo: node: command not found’ errors taking away your precious sleeping hours?
Remove any trace of node on your system, and reinstall it. It will suit your pain:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc . ~/.bashrc mkdir ~/local && ~/node-latest-install && ~/node-latest-install curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 ./configure --prefix=~/local && make install curl https://npmjs.org/install.sh | sh rm -rf ~/node-latest-install
Your one/two steps/commands away from success. Just replace
/path/to/your/home/ with the absolute path to your home directory (leaving the rest of the path as is):