Answers for "brew node switch version"

0

brew node switch version

# install LATEST stable version of node
$ brew install node

# install OLD version of node
$ brew install node@8

# check version of installed node
$ node -v
v10.4.1

# unlink LATEST version of node
$ brew unlink node

# link OLD version of node
$ brew link node@8

# update bash profile to point to OLD version
$ echo 'export PATH="/usr/local/opt/node@8/bin:$PATH"' >> ~/.bash_profile
# or
$ echo 'export PATH="/usr/local/opt/node@8/bin:$PATH"' >> ~/.zshrc

# open a new terminal window and verify version
$ node -v
v8.16.1
Posted by: Guest on March-08-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language