Setup Node with NVM

Instructions

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)

  1. Visit the official NVM GitHub repository.
  2. Download the installer file:
nvm-setup.exe
  1. Run the installer and follow the setup instructions.
  2. 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 on may 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.

© 2026 Viraj Konthasinghe. All rights reserved.
Developed by:  Ceylon Code Labs