INSTALL NVM FOR MAC INSTALL
nvm install 10 to install the latest version of node 10 (replace 10 with whatever version you need).nvm install node to install the most recent version.
You can install as many versions of node that you like. Install the versions of node that you need Type nvm and it’ll give you a list of commands and options if you’ve installed it successfully.Close and reopen your terminal, or open a new terminal window.Nvm (node Version Manager) is a better way, as it allows you to easily switch the version of node you’re using for each project that might need a different one. The typical way to install node is (was?) with Homebrew, you can change the version but it’s fiddly and easy to forget you’ve done it, meaning you’ll be using an old version of node for all of your projects. Thankfully, there are a few ways to downgrade or change the version of node. Of course, I should be upgrading packages to fix vulnerabilities, etc., but in the real world that’s not always immediately possible. A few of my projects still run Gulp version 3, which isn’t compatible with node 12 and above.
I recently (accidentally!) upgraded to version 12 of node on my Mac unsurprisingly it broke things.