4

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.

smilyface
  • 4,259
  • 7
  • 40
  • 49
  • 1
    You need to use nvm (node version manager) to download the Node version 16, and then use it in your project. Which OS are you using? – Charchit Kapoor May 30 '22 at 04:32
  • The best is to uninstall nodejs completely from your PC and install nvm https://github.com/nvm-sh/nvm and nvm makes our life so easy to switch node versions easily. – Javascript Hupp Technologies May 30 '22 at 04:32
  • Your OS is Linux / Windows / Mac? – smilyface May 30 '22 at 05:26
  • Windows is not supported from `n` Just uninstall node.js and re-install the version you wanted. The error message you get is because the OS version check fails. `nvm` on the other hand is also not 100% compatible with windows. – Marc May 30 '22 at 06:56
  • I don't think downgrading to Node 16 is the correct approach, anyway. What are those dependencies that don't support a newer version of Node? – AKX May 30 '22 at 12:49

2 Answers2

2

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

0

n is the simplest package to manage your node versions.

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

Harsh Kanjariya
  • 254
  • 4
  • 5