4 Step Process to Downgrade Node version using Homebrew

Certain node packages can be pretty unstable and based on your project/ teams requirements you might want to downgrade them. (In my case, I had to downgrade from v10 to v9 because we used a bcrypt package version in our API that wasn’t compatible with v10)

Here’s a quick guide on how you can easily do it via home brew :

Check your current node version

$ node -v 

Check for available node versions

brew search node

To unlink from current version

$ brew unlink node

Install the version you want using the following command (e.g. for version 8)

brew install node@8

Link it to the installed version

(Note: Sometimes, when you try linking it or even while installing you might be asked to update your bash rc. Follow the steps on your terminal and you should be all set)

brew link node@8

Lastly, verify you have the right version installed using the node version command from the first step.

(Note : If you downgrading to a lower version because of package issues on your earlier version, you will need to delete the ‘node_modules’ folder present under your project folder for ‘npm install’ to pull in the packages again instead of using cached instances)

| Backend Lead @ HCS | Northeastern University Grad | Ambivert | Selectively Social | Finicky Eater |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store