Solve the problem that electron installation is too slow

1. Electron installation is too slow *

Solution:
1. Go directly to the Taobao file library to download electron , and download the version you need (usually you need to download both mac and win, depending on your project requirements).
Pay attention to the downloaded SHASUMS file, and remember to add the version you are using at the end number, otherwise it will re-download

insert image description here
2. Copy the downloaded file to the following corresponding folder:

3、 Linux:$XDG_CACHE_HOME 或 ~/.cache/electron/

4、 macOS:~/Library/Caches/electron/

5、Windows:~/AppData/local/electron/Cache

6. Run npm install in your project

After performing the above steps, the dependencies can be installed quickly.

Guess you like

Origin blog.csdn.net/tq1711/article/details/109386153