Install Node with NVM
11 March 2022 (Updated 11 March 2022)
Install NVM
export NVM_DIR="$HOME/.nvm" && (
git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR"
cd "$NVM_DIR"
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
) && \. "$NVM_DIR/nvm.sh"
This will clone the NVM git repo into $HOME/.nvm
and run its installer.
Install Node version
You can install the latest long term support version.
nvm install --lts
Or, a specific version.
nvm install 16.3.2
Set default version
nvm alias default <version>
List installed versions
nvm ls
Sources
Tagged:
Node.js
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment