Use Multiple Versions of Node with Homebrew

bmckay959 Avatar

“It works on my machine”. I hate these words, but before I hear “containerization” I just want to keep things simple. Homebrew is great and simple.

To start, we want to know what versions are on our system with Homebrew.

brew search node

The ones with green check marks will tell you what you have installed. I was on 19, but wanted to roll back to 18 for a project so I first needed to unlink 19, then link back to 18.

brew unlink node
brew link node@18

I had to add the –overwrite flag because something was in its place, but everything now works. Check the version to make sure.

node -v

Leave a Reply

Blog at WordPress.com.

%d bloggers like this: