I want to downgrade my version using npm. The current version is 16.13.1. I want to downgrade this to 12.0.1. Can anyone tell me how to do it?
Thanks!
I want to downgrade my version using npm. The current version is 16.13.1. I want to downgrade this to 12.0.1. Can anyone tell me how to do it?
Thanks!
use node version manager nvm
, you can switch any node version that you want.
More details
https://github.com/nvm-sh/nvm/blob/master/README.md
https://www.npmjs.com/package/nvm
nvm install 14.15.5
nvm use 14.15.5
Use below command for all installed node versions
nvm list
You can use: npm install -g node@version
.
So for example in your case it would be -> sudo npm install -g node@12.0.1
might have to force it with --force
at the end.
first check your node version
node -v
sudo npm install -g n
sudo n stable
sudo n 14.6.0 (you can chnage version here as you want to move)
npm install (jst run after all)
now you can check the node and npm version by
node -v
npm -v
Clearing the local installation of node, to find out where is and delete
where node
Install nvm
Show all the versions
nvm ls available
Install what you want
nvm install 12.0.1
nvm use 12.0.1
Check node version
node -v
I have tried several ways and this works, hope it helps.
Try the n
package from npm. Find it here.
npm install -g n
n 10.16.0
n lts
Simply execute
n <version>
to download and install a version of Node.js. If has already been downloaded, n will install from its cache.
I finally found a simple solution.
It works fine for me.
Thanks!