How to upgrade node with brew on macOS

I needed to upgrade a wemo Homebridge plug-in on my Mac mini, but before I could node had to upgraded from its current version v14.15.2 to v14.16.1. To find out the current version the mini was running, fire up Terminal.app type the following and press the “enter” key:

node --version

To find out which node versions brew has already installed:

brew search node

My mini had node@10, node@12, and node@14 installed, so I just typed in the following to go to the next version:

brew install node@15

It seemed to install fine, but I found the same output when executing the following command:

brew search node

And, I see what I did wrong, I upgraded to node v15.14.0 based on the following command:

node –version

I’m not sure why brew doesn’t show “node@15” when I search for installed versions of node, but I’ll let it go for now. Also, I should probably start to uninstall some older versions of node, but for now they can stay.

** Update 5-19-2023 **
I don’t remember how I resolved the situation above, but today my Mac mini was running node 16.18.1 and it upgraded to 16.20.0 using the following command:

brew upgrade node@16

After the upgrade, the following command showed 16.20.0 had installed and was running:

node -v

Leave a Reply

Your email address will not be published. Required fields are marked *