Installation
Installing nvm, Node.js, and npm.
Install nvm
Install nvm to help manage your Node.js versions.
- Go to the nvm-windows release page on GitHub.
- The latest release is at the top. Find the Assets section, and select nvm-setup.zip.
- Open the Windows File Explorer and navigate to
/Downloads
. - Double-click on the nvm-setup.zip folder.
- Double-click on nvm-setup.exe.
- Accept the license agreement and select Next.
- On Select Destination Location, select Next to use the default directory.
- On Set Node.js Symlink, select Next to create a symlink to the default directory.
- Select Install.
- After the installation completes, open a PowerShell or git-bash shell and verify the installation was successful with the following command:If the installation was successful, the nvm version displays beneath the command.
$ nvm version 1.1.9
Install Node.js
You must complete Installing nvm before you can install Node.js.
Every other installation section uses a git-bash for Windows shell. The following instructions are run in Windows PowerShell with Administrator privileges.
- Click on the Windows Start button and type PowerShell.
- Right-click on PowerShell, and select Run as administrator from the context menu.
- View the available Node.js versions with the following command:
> nvm list available | CURRENT | LTS | OLD STABLE | OLD UNSTABLE | |--------------|--------------|--------------|--------------| | 17.8.0 | 16.14.2 | 0.12.18 | 0.11.16 | | 17.7.2 | 16.14.1 | 0.12.17 | 0.11.15 | | 17.7.1 | 16.14.0 | 0.12.16 | 0.11.14 | ... This is a partial list. For a complete list, visit https://nodejs.org/en/download/releases
- Install the latest stable LTS (long-term support) version:
> nvm install 16.14.2
- Verify the installation with the following command:
> nvm ls 17.7.1 16.14.2 * 16.14.0 (Currently using 64-bit executable)
- If the asterisk does not indicate that you are using the correct LTS version, select the correct version with
nvm use
:> nvm use 16.14.2 Now using node v16.14.2 (64-bit)
- Verify that you are using the correct version:
> nvm ls 17.7.1 * 16.14.2 (Currently using 64-bit executable) 16.14.0
Verify npm
When you install a Node.js version with nvm
, npm is installed automatically. Verify your npm
version with the following command:
$ npm --version
8.5.0