[Eelectron Introduction Series] (1) Quickly build an Electron Hello World project

Originality is not easy, please do not reprint without permission.
Blog homepage: https://blog.csdn.net/qq_43058685?spm=1001.2014.3001.5343

Environmental preparation: system: win10, node: 12.14.1, Electron: 12.0

First, you have to prepare the node.jsenvironment for installation .

nodejs download address

Select the stable version to install

Insert picture description here

After installing according to the prompts, open the cmdwindow and enter the following command, the version information can be printed out normally, that is, the installation is complete.

node -v
npm -v

After installing the node environment, download the electron project template

Address: https://github.com/electron/electron-quick-start

If git is not installed locally, you can download the compressed package directly, and then unzip it.

Insert picture description here

If you have downloaded git, use the following command to download

git clone https://github.com/electron/electron-quick-start.git

After downloading the project file, enter the project directory and open the cmd window

Dependency required for installation

npm install

During the installation process, if you encounter this error message, you need to set the following Taobao mirror of npm

Insert picture description here

Set Taobao mirror

npm config set ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/

Re-execute after setting

npm install

So the installation is complete

Insert picture description here

Start running this project

npm start

In this way, Electron's hello world project is completed.

Insert picture description here




Refuse white prostitution, start with one click for three consecutive times! ! !

Originality is not easy, please do not reprint without permission.
Blog homepage: https://blog.csdn.net/qq_43058685?spm=1001.2014.3001.5343

Guess you like

Origin blog.csdn.net/qq_43058685/article/details/115034510