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.js
environment for installation .
Select the stable version to install
After installing according to the prompts, open the cmd
window 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.
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
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
Start running this project
npm start
In this way, Electron's hello world project is completed.
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