https://github.com/electron/electron/issues/20731
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installiete node_modules/electron and try installing again')
https://npm.taobao.org/mirrors/electron
- 下载 https://cdn.npm.taobao.org/dist/electron/7.1.7/electron-v7.1.7-win32-x64.zip
-
复制到你的electron下载位置\node_modules\electron
- 修改
-
\node_modules\electron\install.js
-
- 运行 node install.js (用node运行这个修改好的文件)
测试可以正常运行,这是找到最简单的处理方法了!
有问题联系留意交流