You can downgrade nodejs to a specific version installed on your mac using brew before.
For example, I want to downgrade node from 9
(current/head version) to 6
.
Simplest way is just unlink and link. Since node@6
is keg-only, we use brew link --force
command.
$ node --version
v9.5.0
$ brew unlink node