Step-by-Step Guide: Installing NVM (Node Version Manager) on Windows
Introduction: NVM (Node Version Manager) is a powerful tool that allows developers to manage multiple versions of Node.js on their Windows systems. With NVM, you can easily switch between different Node.js versions for your projects. This step-by-step guide will walk you through the process of installing NVM on your Windows machine.
Step 1: Download the NVM Setup: To install NVM on Windows, you need to download the NVM setup executable from the official GitHub repository. Follow these steps:
- Open your preferred web browser and visit the NVM repository on GitHub: https://github.com/coreybutler/nvm-windows/releases.
- Scroll down to the “Assets” section and locate the latest version of the NVM setup file (e.g.,
nvm-setup.zip
). Click on it to start the download.
Step 2: Extract the NVM Setup: After the download is complete, navigate to the directory where the NVM setup file was saved. Follow these steps to extract it:
- Right-click on the downloaded file (
nvm-setup.zip
) and select "Extract All" from the context menu. - Choose a destination folder where you want to extract the NVM files (e.g.,
C:\nvm
).
Step 3: Run the NVM Setup: Once the NVM files are extracted, you can proceed with the installation process:
- Open the extracted folder (e.g.,
C:\nvm
). - Locate the
nvm-setup.exe
file and double-click on it to start the installation. - Follow the on-screen instructions provided by the NVM setup wizard.
- Select the desired installation options, such as the destination folder and any additional components you want to install.
- Click “Next” and then “Install” to begin the installation process.
Step 4: Configure NVM: After the installation is complete, you need to configure NVM by setting the necessary environment variables. Follow these steps:
- Open the Start menu and search for “Environment Variables” to open the “Edit the system environment variables” window.
- In the “System Properties” window, click the “Environment Variables” button.
- In the “Environment Variables” window, under the “System variables” section, click the “New” button.
- Enter “NVM_HOME” as the variable name and the installation path of NVM (e.g.,
C:\nvm
) as the variable value. - Click “OK” to save the variable.
- In the same “Environment Variables” window, under the “System variables” section, scroll down and locate the “Path” variable. Select it and click the “Edit” button.
- In the “Edit Environment Variable” window, click the “New” button and enter
%NVM_HOME%
as the new entry. - Click “OK” to save the changes.
Step 5: Open a New Command Prompt: To start using NVM, you need to open a new Command Prompt window:
- Close any existing Command Prompt windows.
- Open a new Command Prompt by pressing the “Windows” key, searching for “Command Prompt,” and selecting the “Command Prompt” or “Command Prompt (Admin)” option.
Step 6: Verify NVM Installation: To verify that NVM is installed correctly, run the following command in the newly opened Command Prompt:
cssCopy code
nvm --version
If NVM is installed properly, it should display the installed version of NVM.
Step 7: Install Node.js using NVM: With NVM successfully installed, you can now install your desired