How to install Node.js and npm on Windows#
Installing Node.js and npm on Windows is a very straightforward process.
There are two versions of Node.js that can be downloaded:
- Current - the latest version, has more features, a new version will take its place soon. If you like to use the latest features of Node.js and are in a position to decide which version to use for the project, you should go with this version. To download the latest version go to https://nodejs.org/en/download/current/.
- LTS (Long Term Support) - the last stable version which will be supported for a long time. Projects with lot of dependencies and formalities might want to go with this version. To download the LTS version go to https://nodejs.org/en/download/.
After downloading the installer, run the installer. After the installation process is complete, type
node -v at the terminal:
C:\Users\me> node -v v12.13.1
If Node.js was successfully installed on your computer, you should see the version information printed.
If you get "
node is not recognized as an internal or external command, operable program or batch file.", restart your machine.
The Node.js installer will also install npm, to confirm, tye
npm -v at the terminal:
C:\Users\me> npm -v 6.9.0