Electron can allow us to create desktop application using html and javascript. In this tutorial, we will introduce how to install it in node.js.
Preliminary
In order to install electron, you should install node.js first.
You can read this node.js installation guide.
Install Node.js in Windows 10: A Step Guide – Node.js Tutorial
After having install node.js, we can start to install electron.
Use npm install electron
The simplest way to install electron is to use command below:
npm i electron -g
However, you may get some errors:
1. If you get error: RequestError: connect ETIMEDOUT, you can read this tutorial to fix.
Fix npm install RequestError: connect ETIMEDOUT Error – Node.js Tutorial
2. If you get error: ERR EEXIST. You can refer this tutorial.
Fix npm install ERR EEXIST error: A Step Guide – Node.js Tutorial