Step 1: Install a node version manager. We will use nvm. This is for OSx and Linux only.
If you are using fish shell then install fisher first:
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisherThen install nvm.fish.
fisher install jorgebucaran/nvm.fishOn bash shells you can install nvm directly.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bashStep 2: Run
fnm install latestto get the latest node release.
You can specify a node version by
fnm install 12Step 3: select which node version you want to use with
fnm use 12If on a non fish shell use nvm instead of fnm for all commands.