How to Downgrade Node Version in Windows 10? NVM Utility

Sometimes it may be necessary to downgrade Node to an older version for compatibility or stability reasons. For example, I faced the “ReferenceError: primordials is not defined” error and one of the solutions is to downgrade from 19.7.0 to 10.23.1. In this article, I will show you how to downgrade the Node version in Windows 10 using the NVM(Node Version Manager) utility and keep current Node Js.

Step 1 – Uninstall any existing versions of Node.js

Uninstall Node js
Before installing NVM for Windows, make sure to uninstall any previous versions of Node.js to avoid version conflicts. Additionally, delete any Node.js installation directories that might still exist, such as %ProgramFiles%\nodejs. Keep in mind that NVM’s symlink will not overwrite any existing installation directory, even if it’s empty.

Step 2 – Install nvm-windows

download nvm-setup.exe
Download the latest nvm-windows install. Especially I used ‘nvm-setup.exe’. The installation process is pretty simple, just follow the steps and after it is done restart the power shell terminal.
Install NVM utility

Step 3 – Run Powershell and Turn On NVM

After installation is done run Powershell and type ‘nvm on’:
nvm on command powershell

Step 4 – Install Various Node versions

To find list of the previous releases visit this nodejs.org page.
node js previous versions

To install various versions use the next command: nvm install node version number
Here is an example of installing Node.js 14.3.0 and 16.1.0 versions:
install Node 14 and 16

Step 5 – Switch Node Version and Other Useful NVM Commands

To switch Node Version use nvm use :
switch node version nvm use

Here are some of the most common NVM commands with explanations:

  • nvm version – This command displays the current version of NVM that is installed on your machine.
  • nvm current – This command displays the currently active Node.js version.
  • nvm ls – This command lists all the Node.js versions that are currently installed on your machine.
  • nvm alias – This command creates an alias for a specific Node.js version. For example, nvm alias default 16.14.0 sets the version 16.14.0 as the default version and you can use “default” instead of the version number in other commands.
  • nvm uninstall – This command uninstalls a specific version of Node.js.

Use nvm --help to view list of commands:
nvm --help command

Buy Me A Coffee

Leave a Comment