Created
November 16, 2018 21:03
-
-
Save leolanese/96f6fa9c2987539565d48a9a8e5981d0 to your computer and use it in GitHub Desktop.
downgrade NODE using NVM (installing NVM)
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
NVM | |
node -v | |
npm install -g nvm | |
export PATH=./node_modules/.bin:$PATH | |
git clone git://github.com/creationix/nvm.git ~/.nvm | |
printf "\n\n# NVM\nif [ -s ~/.nvm/nvm.sh ]; then\n\tNVM_DIR=~/.nvm\n\tsource ~/.nvm/nvm.sh\nfi" >> ~/.bashrc | |
NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh | |
npm config delete prefix | |
nvm install v8.10.0 | |
node -v |
finally set it up as default:
nvm alias default system
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To verify that nvm has been installed, do:
command -v nvm
which should output 'nvm' if the installation was successful.
Please note that which nvm will not work, since nvm is a sourced shell function, not an executable binary.
Finally add this to your ~/profile:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion