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)