339

I want to downgrade my Node version from the latest to v6.10.3.

But nothing worked so far. Tried NVM and it gives an error as well by saying make command is not found. How can I downgrade Node?

Penny Liu
  • 11,885
  • 5
  • 66
  • 81
Shashika
  • 6,268
  • 11
  • 47
  • 80
  • 1
    it looks like your package has been installed, but not added to the PATH. add path to your package and all will work fine – Raphael Jun 17 '19 at 07:20
  • https://github.com/facebook/create-react-app/issues/11562 has the details, why to downgrade NodeJs to v16.13.0 – Abhinav Saxena Dec 21 '21 at 08:35

18 Answers18

512

Warning: This answer does not support Windows OS

You can use n for node's version management. There is a simple intro for n.

$ npm install -g n
$ n 6.10.3

this is very easy to use.

then you can show your node version:

$ node -v
v6.10.3

For windows nvm is a well-received tool.

Shady Mohamed Sherif
  • 13,624
  • 4
  • 40
  • 49
aircraft
  • 20,821
  • 22
  • 79
  • 154
125

For windows:

Steps

  1. Go to Control panel> program and features>Node.js then uninstall

  2. Go to website: https://nodejs.org/en/ and download the version and install.

skillsmuggler
  • 1,804
  • 1
  • 9
  • 14
115

Determining your Node version

node -v  // or node --version
npm -v   // npm version or long npm --version

Ensure that you have n installed

sudo npm install -g n // -g for global installation 

Upgrading to the latest stable version

sudo n stable

Changing to a specific version

sudo n 10.16.0

Answer inspired by this article.

Khaled Lela
  • 6,827
  • 6
  • 43
  • 70
33

This may be due to version incompatibility between your code and the version you have installed.

In my case I was using v8.12.0 for development (locally) and installed latest version v13.7.0 on the server.

So using nvm I switched the node version to v8.12.0 with the below command:

> nvm install 8.12.0 // to install the version I wanted

> nvm use 8.12.0  // use the installed version

NOTE: You need to install nvm on your system to use nvm.

You should try this solution before trying solutions like installing build-essentials or uninstalling the current node version because you could switch between versions easily than reverting all the installations/uninstallations that you've done.

itsHarshad
  • 1,289
  • 13
  • 16
33

In Mac there is a fast method with brew:

brew search node

You see some version, for example: node@10 node@12 ... Then

brew unlink node

And now select a before version for example node@12

brew link --overwrite --force node@12

Ready, you have downgraded you node version.

Kike Gamboa
  • 704
  • 6
  • 8
24

For windows 10,

  • Uninstalling the node from the "Add or remove programs"
  • Installing the required version from https://nodejs.org/en/

worked for me.

Sasi Kumar M
  • 2,022
  • 1
  • 18
  • 23
21
 curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
 sudo npm install -g n
 sudo n 10.15
 npm install
 npm audit fix
 npm start
Hariharan AR
  • 1,140
  • 10
  • 19
16

If you're on Windows I suggest manually uninstalling node and installing chocolatey to handle your node installation. choco is a great CLI for provisioning a ton of popular software.

Then you can just do,

choco install nodejs --version $VersionNumber

and if you already have it installed via chocolatey you can do,

choco uninstall nodejs 
choco install nodejs --version $VersionNumber

For example,

choco uninstall nodejs
choco install nodejs --version 12.9.1
kayleeFrye_onDeck
  • 6,155
  • 5
  • 66
  • 74
  • 1
    If you want to stick always to the **Node LTS** version (which might be the reason for the desired downgrade), then use the Chocolatey [nodejs-lts](https://community.chocolatey.org/packages/nodejs-lts) package instead. This offers the advantage to keep up-to-date with the latest supported LTS version. – Tobias May 14 '21 at 15:35
15

If you are on macOS and are not using NVM, the simplest way is to run the installer that comes from node.js web site. It it clever enough to manage substitution of your current installation with the new one, even if it is an older one. At least this worked for me.

sertal70
  • 393
  • 2
  • 9
  • 2
    Here is the official link with all node versions ever https://nodejs.org/dist/ You can use `CTRL+F` (`CMD+F` on Mac) to find exactly the version You need. Download the `.pkg` file if You are using a Mac and You are ready to go! :) – Aleksandar Oct 14 '19 at 11:36
14

Try using the following commands

//For make issues 
sudo apt-get install build-essential

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | bash

//To uninstall a node version 
nvm uninstall <current version>

nvm install 6.10.3

nvm use 6.10.3

//check with 
node -v
Kalana Demel
  • 3,059
  • 3
  • 21
  • 33
  • notice: this installs ```nvm``` - a service that lets you have multiple node versions installed on you computer, and to set a node version for each project/folder – Shani Kehati Aug 04 '21 at 10:53
9

Steps to downgrade to node8

brew install node@8
brew link node@8 --force

if warning remove the folder and files as indicated in the warning then again the command :

brew link node@8 --force
Suraj Rao
  • 28,850
  • 10
  • 94
  • 99
Fabien Thetis
  • 1,310
  • 13
  • 10
  • Worked for me perfectly - also the advantage is - you then have proper updates through brew but only for the selected release. You could have issues during the 'link' stage if you have leftovers from previous installations but you will be pointed where so it is easy to clean. – Roman Nikitchenko Jun 15 '20 at 08:10
  • `brew link node@8 --force --overwrite` solved the problem – Anton Lukin Jul 13 '20 at 20:07
7

I have used brew in mac to downgrade the node

follow the steps you will have the result:

  1. brew search node (here you can see the version eg: node@10, node@12, node@14)
  2. brew unlink node
  3. brew install < node version > (eg: node@12)
  4. brew link --overwrite node@12
4

For windows users, you guys can downgrade using following commands.

npm uninstall -g node

npm install -g node@version

@version is your specified version, example : 12.22.3(little old)

Can find node releases here https://nodejs.org/en/download/releases/

Arya Mohanan
  • 177
  • 4
3

In case of windows, one of the options you have is to uninstall current version of Node. Then, go to the node website and download the desired version and install this last one instead.

Alberto S.
  • 1,181
  • 16
  • 29
3

If you are using nvm, following are the ways -

1. nvm install node_version
2. nvm use --delete-prefix node_version

For more insights, see this image - enter image description here

Suprabhat Kumar
  • 437
  • 4
  • 9
2

Ubuntu:

nvm list
nvm use <version>

nvm list // Shows all the versions on your machine. Of course have your version installed.

nvm use // Use this version

Jacques Koorts
  • 1,751
  • 1
  • 15
  • 10
0

The Node.js team suggests to use the following Node.js version managers to switch between different versions of Node:

OSX or Linux:

Windows:

I personally made good experiences using "nvm-windows" on Windows 11.

Benny Neugebauer
  • 46,191
  • 22
  • 218
  • 190
-1

I would recommend using NVS (Node Version Switcher).

You can see the source here and all you need is a package manager. Like Chocolatey or Homebrew.

Install it

choco install nvs

Add a version:

nvs add v16

Switch to any version you installed

nvs use v16

At the end if you "run node -v" you'll get the current you've switched.

YanMax
  • 29
  • 4