Before installing electron, make sure that you have installed nodejs on your computer. If you have not installed already, get the installer from here. Note that this installs npm as well for you. Once the installation is complete, you can confirm that node and npm are installed by running the following commands in your terminal.
Install electron globally by running the following command in the terminal.
... read the whole story at techshard.com.