Wednesday, 15 February 2023

Nodejs - How to switch Nodejs version between projects [Windows]

Step 1: Install Node Version Manager (NVM)

Instead of using npm to install and uninstall Node versions for your different projects, you can use nvm, which helps you effectively manage your node versions for each project.

  • Download nvm from the below link 

https://github.com/coreybutler/nvm-windows/releases/download/1.1.10/nvm-setup.exe

 

Step 2: Make sure you have set the environment variables for nvm and nodejs as




Step 3: Open the terminal and run as administrator

  • Verify your current nodejs and nvm version by using the commands 
node -v and nvm -v


  • I would like to downgrade node version from v18.14.0 to v12.14.1.
  • Use the command nvm install 12.14.1 and once the installation complete, execute the command nvm use 12.14.1 which helps you to switch the node versions.



Step 4: To list all your node versions, 

use the command nvm list and it will highlight the current version as well












 



No comments:

Post a Comment

Nodejs - How to switch Nodejs version between projects [Windows]

Step 1: Install Node Version Manager (NVM) Instead of using npm to install and uninstall Node versions for your different projects, you can ...