
In our case, since we have only one version installed. Using the below command to specify the version of npm that you wish to use.

Specify the version of npm that you choose to use

nvm install 12.6.8 to install a specific npm version You can now install 'npm' using the following command.Type the below command to verify if your nvm installation was successful. Click on Install & once it completes, click on the 'Finish' button.Ĭonfirm that the 'NVM' successfully installed.You should have the file nvm-setup.exe extracted in the same folder.ĭouble-Click on the executable file to launch the installer.Unzip/Extract the contents to the same folder.The Zip file should have been downloaded to your Downloads folder (or where ever you have configured your downloads to be saved).Using your browser navigate to the Git repository for nvm-windows located over here.Ĭlick on the 'nvm-setup.zip' link from the 'assets' table as shown in the image below. Installing NVM for Windows 10 Go to the nvm-windows Git Repository So, if you have installed Node.js, you'll have npm installed as well. It is a tool that allows you to install JavaScript packages. Node.js - It is a platform for running JavaScript applications. It allows you to pick and choose the Node.js version that you wish to use. It is a tool that allows you to download and install Node.js. So, feel free, to skip this section, if you are already familiar. I wanted to mention the following terminologies for absolute beginners. This article is more of a user guide for folks who are interested to install a Node Version Manager for Windows 10 Operating System. The reason I choose to do that is because I usually have to work with multiple applications that need require different Node.js versions, and using a node version manager (NVM) it is very easy to switch versions. I usually prefer to use a Node Version Manager to install Node.js.

"test": "npm run check-version & echo \"Error: no test specified\" & exit 1"ĭo run npm install command before you run npm run start command to run your project.I had recently purchased a Windows 10 laptop and I wanted to install Node.js. "start" : "npm run check-version & npm run start-server", "check-version" : "node checkVersion.js", If (!semver.satisfies(process.version, nodeVersion)). Compare installed NodeJs version with required NodeJs version. 'use strict' Ĭonst engines = require('./package').engines

For that, I wrote a code which can be run before starting the Server using npm run start script.įound below code helpful from this question. I wanted to know the current NodeJs version I am going to use to run my server at runtime. I had the similar issue with my codebase.
