Install Node using NVM
A guide to using NVM to install versions of Node.
If you don't have NVM yet, see Install NVM gist.
- Install a target Node.js version. A short version will do.
$ nvm install 14
- Select the installed version.
$ nvm use 14 Now using node v14.9.0 (npm v6.14.8)
- Check that your target Node.js version works.
$ node -v v14.9.0 $ npm -v 6.14.8 $ which node /Users/mcurrin/.nvm/versions/node/v14.9.0/bin/node
- List available installed versions.
$ nvm ls v10.0.0 v10.15.0 v14.9.0 -> system default -> node (-> v14.9.0) ...
- List versions which can be installed.
That is very long, so you can use a grep pattern instead.
$ nvm ls-remote
$ nvm ls-remote 14 v14.0.0 v14.1.0 v14.2.0 v14.3.0 v14.4.0 v14.5.0 v14.6.0 v14.7.0 v14.8.0 v14.9.0 v14.10.0 v14.10.1 v14.11.0 v14.12.0 v14.13.0
You can install more versions side by side and choose to activate any given one.
You can also set a default version so a new terminal starts with a given version activated. changing to use another version won't affect the default or other terminals.