-
-
Save ZhouHansen/a851505306c41db211d4536af8434d70 to your computer and use it in GitHub Desktop.
Solutions for unexpected problems from using electron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you are in china: | |
❌ `npm install electron` | |
❌ `npm run build` | |
✅ `ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ npm install electron` | |
✅ `ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/ npm run build` | |
For windows command line:(no space between two command) | |
✅ `set ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/&&npm run build` | |
If `fs-events` error hits you, e.g. when you use chokidar: | |
❌ `npm install` | |
✅ `npm install --no-optional` | |
If you use `electron-builder` and windows, you need to download and put some files to the right place: | |
https://blog.csdn.net/bailong1/article/details/78657605 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment