Created by Oliver SchafeldLinked to 1.3m issues across 178 teams
Here's how to update Node.js:
Step 1: Check your current version of Node.js. To check which version of Node.js you are currently using, open your terminal and type the following command:
node --version
Step 2: List all installed versions of Node.js. To list all versions of Node.js you have installed, type the following command:
nvm ls
Step 3: List all available versions of Node.js To list all versions of Node.js available for installation, type the following command:
nvm ls-remote
Step 4: Install a specific version of Node.js To install a specific version of Node.js, type the following command, replacing the version number with the version you wish to install:
nvm install <version number>
Step 5: Set the active version of Node.js To set the active version of Node.js, type the following command, replacing the version number with the version you wish to use:
nvm use <version number>
And that's it! You have successfully updated Node.js.