Install NVM on Windows
Node Js is a JavaScript runtime environment used widely in today’s web application development. If we are working on different Node Js projects then there might be a chance to have different versions for each project. To handle different versions, there is a software Node Version Manager also known as NVM, by this we can install different versions on our system and use any required version in the respective application as we just need to change the version for each application.
It was a brief introduction of NVM. Now to install NVM on your Windows System, we first need to download its exe file from this URL. Top section will be the latest version, at the time of writing this post the latest version is 1.1.12. So under this section scroll down to `Assets` and click on `nvm-setup.exe` by clicking on this your downloading will be started or it will ask you for location where to save the .exe file.
Click on save button, once downloading is completed then double click on exe file to launch the nvm setup wizard. At first you will be prompted to select `Yes` or `No`. Select `Yes` to start installation. Accept license agreement and click on `Next` button.
Now confirm the installation path and click on `Next` button, here you can change the installation directory by clicking on `Browse` button. As in the screenshot below, I changed it to Program Files.
Next, you will be asked for the `nodejs` path, here you can set it as default or change it as per your requirement. Mine path will also be in Program Files as before for nvm.
Next, click on the `Install` button then `Finish`.
After complete installation, open `Windows Powershell` or `Command Prompt`. And type following command.
nvm -v
It should show you the nvm version same as we downloaded. If it gives you an error something like `nvm term is not recognized` then you might need to add nvm path to windows `Environment Variables`.
That’s it. It’s easy to install, now you can use it in your projects. Following are some commands to use it.
nvm list
Initially, it will not show any list instead it will show this message
`No installations recognized.`
Then install any node version, I am going to install 18, so the command will be as follows.
nvm install 18
You might get a permission error, if so then open `Windows Powershell` as administrator. Then run the same command.
Now again run the list command. You will get the version listed. If you install another version then it will also be listed.
Hope this will be helpful.
I hope you already have WSL2 installed and enabled. So, setting up Apache2 on WSL2…
You can easily reset WSL 2 users' password, by just following the following steps. Open…
DreamHost a web hosting company, founded in 1997. It is offering sort of hosting services,…
Menus in WordPress are highly versatile and can be easily modified to change in your…
Laravel is famous and robust PHP framework, widely used in different type of projects. While…
Python is very powerful and famous language, which allow us to write code as per…