Tarun Sahnan
Tarun Sahnan

Reputation: 57

Downgrade Node Js version

I want to downgrade the NodeJs version to 16 as some of the dependencies I am using in my React app do not support NodeJs 17. I tried this method (another post on stack overflow) also but this thing is not getting installed on my PC.

OS: Windows enter image description here

Any sort of help is appreciated. Thanks in advance.

Upvotes: 5

Views: 37685

Answers (5)

dylanh724
dylanh724

Reputation: 1018

  1. Install nvm (See link readme: Windows uses installer, Linux has a CLI copy+paste bash script).
  2. Restart the shell (if it was open when installed) to register the new path.
  3. If you want 14.18.1, for example: nvm use 14.18.1
  4. If you don't have it installed, it'll let you know. In that case: nvm install 14.8.1 -> repeat #3.
  5. node -v to verify.

Upvotes: 0

Tam Vo
Tam Vo

Reputation: 104

Nodejs.org has previous releases versions in their distribution directory. Find the node version you need and install it.

https://nodejs.org/dist/

Upvotes: 0

Ming
Ming

Reputation: 121

Clearing the local installation of node, to find out where is and delete

where node

Install nvm

For Windows

For others

Show all the versions

nvm ls available

Install what you want

nvm install 16.11.0
nvm use 16.11.0

Check node version

node -v

I have tried several ways and this works, hope it helps.

Upvotes: 6

Taulut Hossain Washi
Taulut Hossain Washi

Reputation: 71

You can use Node Version Manager(NVM).where you can downgrade or upgrade any node version. Please check

https://github.com/nvm-sh/nvm

Windows: https://dev.to/skaytech/how-to-install-node-version-manager-nvm-for-windows-10-4nbi Ubuntu: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04

Upvotes: 3

Harsh Kanjariya
Harsh Kanjariya

Reputation: 543

n is the simplest package to manage your node versions.

https://www.npmjs.com/package/n

Upvotes: -1

Related Questions