Setup Node with NVM
Prevent Automatic Node.js Version Upgrades
Follow this guide to prevent automatic Node.js upgrades by managing your Node versions using NVM (Node Version Manager).
1. Uninstall Existing Node.js
Before installing NVM, ensure that Node.js is removed from your system.
- Open Windows Settings
- Navigate to Apps → Installed Apps
- Locate Node.js
- Click Uninstall
This ensures there are no conflicts with NVM-managed Node versions.
2. Install Node Version Manager (NVM)
- Visit the official NVM GitHub repository.
- Download the installer file:
nvm-setup.exe
- Run the installer and follow the setup instructions.
- Restart your computer after installation.
3. Verify NVM Installation
Open a terminal / command prompt and run:
nvm -v
If NVM is installed correctly, it will display the installed version.
4. Install a Specific Node.js Version
Use NVM to install the required Node.js version.
nvm install <version>
Example:
nvm install 20.9.0
5. Verify Installed Node Versions
To see the list of installed Node versions:
nvm list
6. Activate Node.js
Switch to a specific Node version using:
nvm use <version>
Example:
nvm use 20.9.0
⚠️
nvm onmay not be required in most setups.
7. Final Verification
Ensure everything is working correctly:
node -v
npm -v
This will display the installed Node.js and npm versions.
Switching Between Node Versions
If you have multiple Node versions installed, you can switch between them anytime:
nvm use <version>
Example:
nvm use 18.20.2
✅ You are now managing Node.js versions safely without automatic upgrades.