How to downgrade Node version

node.js

node.js Problem Overview


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?

node.js Solutions


Solution 1 - node.js

> Warning: This answer does not support Windows OS

You can use n for node's version management. https://www.npmjs.com/package/n">There</a> 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.

Solution 2 - node.js

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.

Solution 3 - node.js

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.

Solution 4 - node.js

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.

Solution 5 - node.js

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.

Solution 6 - node.js

For windows 10,

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

worked for me.

Solution 7 - node.js

 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

Solution 8 - node.js

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

Solution 9 - node.js

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.

Solution 10 - node.js

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

Solution 11 - node.js

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

Solution 12 - node.js

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

Solution 13 - node.js

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/

Solution 14 - node.js

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.

Solution 15 - node.js

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

Solution 16 - node.js

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

Solution 17 - node.js

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionShashikaView Question on Stackoverflow
Solution 1 - node.jsaircraftView Answer on Stackoverflow
Solution 2 - node.jsDharmendra Singh PokhariyaView Answer on Stackoverflow
Solution 3 - node.jsKhaled LelaView Answer on Stackoverflow
Solution 4 - node.jsitsHarshadView Answer on Stackoverflow
Solution 5 - node.jsKike GamboaView Answer on Stackoverflow
Solution 6 - node.jsSasi Kumar MView Answer on Stackoverflow
Solution 7 - node.jsHariharan ARView Answer on Stackoverflow
Solution 8 - node.jskayleeFrye_onDeckView Answer on Stackoverflow
Solution 9 - node.jssertal70View Answer on Stackoverflow
Solution 10 - node.jsKalana DemelView Answer on Stackoverflow
Solution 11 - node.jsFabien ThetisView Answer on Stackoverflow
Solution 12 - node.jsAshutosh RanjanView Answer on Stackoverflow
Solution 13 - node.jsArya MohananView Answer on Stackoverflow
Solution 14 - node.jsAlberto S.View Answer on Stackoverflow
Solution 15 - node.jsSuprabhat KumarView Answer on Stackoverflow
Solution 16 - node.jsJacques KoortsView Answer on Stackoverflow
Solution 17 - node.jsYanMaxView Answer on Stackoverflow