Reputation: 9477
I want to downgrade my Node version from the latest to v6.10.3
.
But nothing has worked so far. Tried NVM and it gives an error as well by saying that the make
command is not found. How can I downgrade Node?
Upvotes: 531
Views: 1474604
Reputation: 41
Answer for Mac: The answer is using the 'HomeBrew'
Open terminal and write command brew search node
(results like: node@16, node@20, etc)
brew unlink node
brew link node@20
(you can use other version which is already installed in you system or install required version)
Upvotes: 1
Reputation: 635
use nvm
from this link and install it. then use nvm install <version name>
of your desired node version to install it. Finally write nvm use <version name>
on your terminal to switch to your desired version number.
Upvotes: -1
Reputation: 832
I too wanted to downgrade my node version (v18.13.0) to a stable version(v16.10.0). So I followed these steps in my windows OS:
nvm-setup.exe
one. Choose your suitable version. After downloading the setup file, launch the installation wizard and follow the on-screen directions to install nvm.PATH
environment variable. Like: C:\Users\damik\AppData\Roaming\nvm
nvm
in your cmd and you can clarify the installation of nvm.nvm uninstall v18.13.0
. First check your node.js and add relevant version here.nvm install v16.10.0
. Please install the relevant version here.nvm use v16.10.0
nvm alias default v16.10.0
to make this version the default for all new shell sessions:node -v
. And now it's all ok ;)Upvotes: 1
Reputation: 101
Here is a simple solution
Go to this link and download & install the suitable nvm setup on your computer https://github.com/coreybutler/nvm-windows
Type nvm list
to get list of installed node versions
Type nvm install <node-version>
Type nvm use <version>
here we go you got node version you want.
Browse here to find node versions => https://nodejs.org/en/download/releases/
Upvotes: 9
Reputation: 26924
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.
Upvotes: 722
Reputation: 31
WINDOWS: Best way that you can do it and to not lose time.
Link with node versions: https://nodejs.org/uk/blog/release/
Upvotes: 3
Reputation: 11
I had to downgrade node to v10.16.0
sudo n 10.16.0
nvm use v10.16.0
this solved the problem for me
Upvotes: 1
Reputation: 129
it seems to be a compatibility issue, run
sudo n 14
then npm install or yarn install again. It will work
Upvotes: 4
Reputation: 54965
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.
Upvotes: 1
Reputation: 695
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 -
Upvotes: 8
Reputation: 1827
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
Upvotes: 5
Reputation: 767
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/
Upvotes: 11
Reputation: 91
I have used brew in mac to downgrade the node
follow the steps you will have the result:
Upvotes: 9
Reputation: 1114
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.
Upvotes: 71
Reputation: 8139
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.
Upvotes: 184
Reputation: 6978
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
Upvotes: 20
Reputation: 1639
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.
Upvotes: 54
Reputation: 2630
For windows 10,
worked for me.
Upvotes: 29
Reputation: 1995
For windows:
Steps
Go to Control panel> program and features>Node.js
then uninstall
Go to website: https://nodejs.org/en/ and download the version and install.
Upvotes: 197
Reputation: 1556
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
Upvotes: 24
Reputation: 2115
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.
Upvotes: 5
Reputation: 1734
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
Upvotes: 10
Reputation: 599
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.
Upvotes: 17
Reputation: 3266
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
Upvotes: 16