Last active
November 12, 2015 01:42
-
-
Save kmassada/cb0c0a4f251684271418 to your computer and use it in GitHub Desktop.
completely uninstall node js and reinstall
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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