Manage node versions with brew
TLDR
brew install node node@10 node@8 node@6 latest, and all LTS versions at time of writing
brew info node@10 gets the $PATH variable you'll need to use node v10. You will only need the following line:
export PATH="/usr/local/opt/node@10/bin:$PATH" Tada! In this shell session only, node v10 is the executable that will be used first!
If you’re like me, you like to keep your system’s package versions up to date with the latest features and security patches as vigilantly as possible. So if you’ve had to work with multiple node versions on one development machine, you may have had a hard time keeping both these worlds in sync. Today I learned/pieced together a way to keep myself sane after dealing with node/npm permission issues for the last damn time. This also has only been possible relatively recently (at time of writing) since node@X
versions have only been recently published...