Electron | throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')

https://github.com/electron-vite

问题原因

在install的时候node_modules/electron/中的文件丢失造成程序无法执行

解决方案(之一)

参考https://github.com/pangxieju/electron-fix

// 1.
npm instal
// 2.
npm install -g electron-fix
// 3.
electron-fix start
//4.
npm run dev

参考文章
Electron failed to install correctly, please delete node_modules/electron and try installing again

解决安装electron卡在node install.js 不动问题

posted @ 2024-06-30 23:41  槑孒  阅读(16)  评论(0编辑  收藏  举报