'How to downgrade node version?
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!
Solution 1:[1]
use node version manager nvm
, you can switch any node version that you want.
More details
Solution 2:[2]
You could also install the node
npm module to change (upgrade or downgrade) the NodeJS version for the specific project.
Solution 3:[3]
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.
Solution 4:[4]
You can accomplish that with Node Version Manager. Install nvm first, and in a terminal:
nvm install 12.0.1
Then
nvm use 12.0.1
Solution 5:[5]
You can use: npm install -g node@version
.
So for example in your case it would be -> sudo npm install -g [email protected]
might have to force it with --force
at the end.
Solution 6:[6]
I finally found a simple solution.
- Uninstall the current Version
- Download the version you want.
It works fine for me.
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dako patel |
Solution 2 | code |
Solution 3 | Ivan Bacher |
Solution 4 | J.dev |
Solution 5 | Tyler2P |
Solution 6 | Priya |