There are many articles on the Internet to introduce the solution to slow electron installation, but the effect is not very good, here is my own method
The window system
npm config edit
Copy the code
This command will open the NPM configuration file, please add under registry=https://registry.npm.taobao.org/ line
electron_mirror=https://cdn.npm.taobao.org/dist/electron/
Copy the code
MAC system
open .npmrc
Copy the code
Then run NPM Install Electron again and you’ll see that the installation is instantaneous