The first thing you have to do is go to the node.js website and download the LTS version. At the time of writing this article, the version is 12.13.1
Then double click on the file to launch the wizard. Press Next to begin the installation.
Next, you accept the terms of the license.
Please set the installation directory. You can leave it by default or choose a different one.
Now, there are components to install. I recommend that you leave it by default as it is the most comfortable option.
The following table offers a very interesting option. In fact, the wizard offers to install some tools necessary for the operation of the program. Additionally, this will be done automatically and unattended. Please note that if you do not check this option, you will have to install the tools manually.
After the previous settings have been made, the wizard will start the installation.
The wizard will start the installation of the program.
After a few seconds, the wizard will indicate that your work was successful and that the program has been installed.
Installing the extra tools
Once you press Finish to close the wizard, the installation of the extra tools will begin. Forthwith, a window will pop up indicating the installation of the Node.js Native Modules Script Installation. Just press any key to continue:
Next, it is explained that the script downloaded and installed Chocolatey to install the packages. Press any key to continue.
Once the above steps are completed, a PowerShell window will pop up that will download and install the packages through Chocolatey. As already mentioned, this is an automatic and unattended process. However, if an error occurs, just update Windows and run the installer again.
Installing Node.js using Chocolatey.
It is also possible to install Node.js on Windows 10 using the Chocolatey repository manager. To find out how to install and use it, please check out our tutorial. Well, to install just run this command in PowerShell.
cinst nodejs install
If the installation is successful, you will get the message of the successful installation of Node.js
Testing Node.js installation
After installing Node.js, let’s try it out. With that intention, open a CMD and type the following command:
node -v npm -v
With these commands, we are seeing the version of Node.js and the version of the NPM package manager.
Testing the operation of Node.js
Then open the text editor of your choice and create a file with the following content:
console.log('correctly installed Node');
After adding the text, proceed to save it with any name in the folder called node. In this case, the name will be test. The most important thing is that the file extension should be .js At the end the file would be named test.js
Then open a Command Prompt and navigate to the folder location using the following commands:
cd documents cd node
It then executes the file we just created, using the following command:
Finally, we have seen how to install Node.js on Windows 10. From now on, you can use this powerful Java execution environment. That’s all for now, I hope you enjoyed it.