electron-builder打包失败,提示Application ... app.asar does not exist

错误代码:
• electron-builder version=22.10.4
• writing effective config file=distbuilder-effective-config.yaml
• no native production dependencies
• packaging platform=win32 arch=x64 electron=12.2.3 appOutDir=distwin-unpacked
Error: Application entry file “dist\electron\main.js” in the “D:\electronWork\electron-egg\build\win-unpacked\resources\app.asar” does not exist

异常表现:
electron-builder打包失败

解决办法:
electron项目根目录中,如果有app文件目录,则该目录必须是个普通文件目录,
比如,app/目录内,不能有 .git、 package.json、node_modules等文件。

如果你使用的是 electron-egg 框架icon-default.png?t=M4ADhttps://github.com/wallace5303/electron-egg
那么前端项目默认的文件夹名称为:frontend,请不要改动这个文件名称。

猜你喜欢

转载自blog.csdn.net/qq_32660241/article/details/124737726