Skip to content

Instantly share code, notes, and snippets.

@grandmanitou
Created June 18, 2020 09:11
Show Gist options
  • Save grandmanitou/664fbf69a70987efcb9e0628d188cb70 to your computer and use it in GitHub Desktop.
Save grandmanitou/664fbf69a70987efcb9e0628d188cb70 to your computer and use it in GitHub Desktop.
How to switch Node versions with Homebrew

Remode node modules

rm -rf node_modules

Check node current version

$ node -v

Outputs something like

v14.00

Unlink from current version

$ brew unlink node

Search for another version

$ brew search node

Install older version

$ brew install node@10

Link it

$ brew link node@10

Reload zsh or bash profile

$ source ~/.zshrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment