How to downgrade Node.js version from 21 to 20 using Node Version Manager (NVM)?
I am working on a project that requires Node.js version 20.x.x. However, my development environment is configured with Node.js version 21.6.1. I need to downgrade Node.js to version 20 using Node Version Manager (NVM) in my Visual Studio Code terminal.
Could someone please provide step-by-step instructions on how to accomplish this task?
I’m looking for guidance on how to:
- Install Node Version Manager (NVM) if it’s not already installed.
- Download and install Node.js version 20 using NVM.
- Set Node.js version 20 as the active version in my Visual Studio Code terminal.
- Verify that the installation was successful and I’m now using Node.js version 20.
2
Answers
knowing nvm made my life actually better :). To install:
nvm --version
on your terminal, then it is properly installed.nvm install <<version>>
. So for node 20.1.5, you can executenvm install 20.1.5
.nvm use <<version>>
to use the node version.node --version
.is there a better way to achieve this than downgrading, i am trying to experiment with strapi too