
To find the default version for the current user, run the following command: $ nvm run default -version You should see the following output: Now using node v12.17.0 (npm v6.14.4) To set your default Node.js version to 12.17.0, run the following command: $ nvm use 12.17.0 You can find the all available Node.js versions using the following command: $ nvm ls-remote You should see the following output: -> v12.17.0 To list all installed Node.js versions in your system, run the following command: $ nvm ls You should see the following outpu v12.17.0 Use NVM to Manage Node.js Versions Now, verify the current Node.js version using the following command: $ node -version You should see the following output: Downloading and installing node v12.17.0. To install the specific Node.js version (12.17.0), run the following command: $ nvm install 12.17.0 If you want to install the latest stable version of Node.js run the following command: $ nvm install node -lts You should see the following output: v16.9.0

# 100.0%Ĭreating default alias: default -> node (-> v16.9.0) To verify the installed version of Node.js, run the following command: $ node -version To install the latest version of Node.js, run the following command: $ nvm install node You should see the following output: Downloading and installing node v16.9.0. You should see the following output: 0.38.0 Install Node.js with NVM Now, verify the NVM version using the following command: $ nvm -version

Alternatively, simply log out and log in again.
