# 1.
# remove nvm script
rm -rf ~/.nvm
# 2.
# Remove any references to nvm in your ~/.bashrc, ~/.zshrc, ~/.config/fish/config.fish or whatever your config file is
# 3.
# uninstall node. removes any node modules and such from old versions of node
brew uninstall node --force --ignore-dependencies
# 4.
# new fresh clean node
brew install node
# 5.
# this is your version manager
npm install --global n
# 6.
# it needs access to your local bin so it can update the node symlink
sudo chown -R `whoami` /usr/local/bin
# 7.
# it installs all the node versions in this other folder and symlinks /usr/local/bin/node to these
sudo mkdir -p /usr/local/n
sudo chown -R `whoami` /usr/local/n
# 8.
# install whatever version of node you want
n 8.9.0
# 9.
# install yarn too
npm install --global yarn@1.1.0
# 10.
# remove node modules
rm -rf node_modules
yarn cache clean
yarn-
-
Save avegancafe/fb31cc399a62eb82690e6e4343594565 to your computer and use it in GitHub Desktop.
Switching from nvm to n
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment