Skip to content

Instantly share code, notes, and snippets.

@kmassada
Last active November 12, 2015 01:42
Show Gist options
  • Save kmassada/cb0c0a4f251684271418 to your computer and use it in GitHub Desktop.
Save kmassada/cb0c0a4f251684271418 to your computer and use it in GitHub Desktop.
completely uninstall node js and reinstall
#clear all the npms
npm -g ls | grep -v 'npm@' | awk '/@/ {print $2}' | awk -F@ '{print $1}' | xargs npm -g rm
#remove all the binaries
sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
#compile
wget http://nodejs.org/dist/v0.10.40/node-v0.10.40.tar.gz
tar -xzf node-v0.10.40.tar.gz
./configure
make
make install
#npm
curl -L https://www.npmjs.com/install.sh | sh
#rvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
#I've been using 'N' but 'rvm' more suited. my [[npm root -g: $HOME.nvm/v0.10.40/lib/node_modules]] `npm debug`
rvm install 5.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment