1. Install NodeJS

Download address:

nodejs.cn/download/(Chinese address)

Nodejs.org/en/download…→ For example, download files:Nodejs.org/dist/v12.16…

As shown below, we downloaded the Windows 64-bit installation package:



Install it after downloading it.

After installation, you can view its version information:

Run CMD as the administrator, and then run the commands node -v and NPM -v respectively to view the version information

Configure the NPM global installation path. Run CMD as the administrator. Then run the NPM config set prefix “D:\Net_Program\Net_NodeJS\node_global” command to check whether the node_global folder is automatically generated. If it exists, the configuration is successful

Right-click computer, click properties, click Advanced System Settings, click Environment Variables, System Variables, locate the path variable and add D:\Net_Program\ net_nodejs\ node_global

2, install the package command line management tool CNPM as the administrator, run CMD, and then enter ** NPM install CNPM -g –registry=registry.npm.taobao.org** and wait patiently. Can take a long time (approximately 49 seconds on February 18, 2020)

Enter CNPM -v to check whether the installation is successful

Run CMD as the administrator, then enter CNPM install Electron @^8.0.0 -g and run the command. Note that 8.0.0 in the command line above represents the version number of Electron. Each specific Electron version please see: npm.taobao.org/mirrors/ele…

Run the electron -v command to check whether the installation is successful

4. Install gulp globally (available for VSCode automatic tasks)

Run CMD as an administrator, enter CNPM install -g gulp, and run

5. Install the electron Builder globally

Run CMD as an administrator, then enter the command CNPM install electronic-builder -g

Run the electron- Builder -v command to check whether the installation is successful

Run the CMD command as the administrator and run the CNPM install electron-packager -g command

Run the electron packager -v command to check whether the installation is successful

7. Install asAR globally. Run CMD as the administrator and enter CNPM install asar -g

Enter asar -v to check whether the installation is successful

If you want to delete electron, you can enter the command CNPM uninstall electron. Run the CNPM update electron@^8.0.1 -g command. The electron information screen is displayed

At this point, installing Electron on Windows is complete.