The Node.js Official Website describes various ways to install Node.js, but we recommend using nvm to install Node.js, as this is a very convenient way to switch between different versions of Node.js.
The installation of nvm is easy, just execute a shell script, the latest version of nvm is v0.37.2:
$ curl -o- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh> | bash # or via wget $ wget -qO- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh> | bash
Of course, the safest way is to copy the latest official shell script: https://github.com/nvm-sh/nvm#install--update-script
After installing nvm, either reboot the terminal or execute the following script for the nvm command to take effect:
export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \\. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \\. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
After installing nvm, we can install Node.js, we recommend installing the latest LTS version:
$ nvm install --lts
node -v command to view the installed version of Node.js.
After completing the installation of Node.js, you can install ABT Node:
$ npm install -g @abtnode/cli
After installation, you can run
abtnode --version to see the current version.
Installation is also very easy, as the website provides installation packages for Windows/Mac/common Linux distributions that can be installed with a single click: https://code.visualstudio.com/#alt-downloads