Mac下使用electron-builder 打包

发布于 2022-09-12 03:21:14 字数 5137 浏览 12 评论 0

`**bogon:vue-electron-seat ji$ electron-builder --win
• electron-builder version=21.2.0 os=19.4.0
• loaded configuration file=package.json ("build" field)
• description is missed in the package.json appPackageFile=/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/package.json
• author is missed in the package.json appPackageFile=/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/package.json
• writing effective config file=build/builder-effective-config.yaml
• packaging platform=win32 arch=x64 electron=9.0.4 appOutDir=build/win-unpacked
⨯ Application entry file "background.js" in the "/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/build/win-unpacked/resources/app.asar" does not exist. Seems like a wrong configuration. stackTrace=

                                                                                                                                                                                                   Error: Application entry file "background.js" in the "/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/build/win-unpacked/resources/app.asar" does not exist. Seems like a wrong configuration.
                                                                                                                                                                                                       at error (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:7:12)
                                                                                                                                                                                                       at checkFileInArchive (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:33:11)
                                                                                                                                                                                                       at WinPackager.checkFileInPackage (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/app-builder-lib/src/platformPackager.ts:402:7)
                                                                                                                                                                                                       at WinPackager.sanityCheckPackage (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/app-builder-lib/src/platformPackager.ts:453:5)
                                                                                                                                                                                                       at WinPackager.doPack (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/app-builder-lib/src/platformPackager.ts:242:5)
                                                                                                                                                                                                       at WinPackager.pack (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/app-builder-lib/src/platformPackager.ts:114:5)
                                                                                                                                                                                                       at Packager.doBuild (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/app-builder-lib/src/packager.ts:437:9)
                                                                                                                                                                                                       at executeFinally (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/builder-util/src/promise.ts:12:14)
                                                                                                                                                                                                       at Packager._build (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/app-builder-lib/src/packager.ts:366:31)
                                                                                                                                                                                                       at Packager.build (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/app-builder-lib/src/packager.ts:330:12)
                                                                                                                                                                                                       at executeFinally (/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/node_modules/builder-util/src/promise.ts:12:14)

**`

使用electron-builder打包windows 应用 始终报
Application entry file "background.js" in the "/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/build/win-unpacked/resources/app.asa错误
那位大神指点一下怎么解决

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瞎闹 2022-09-19 03:21:14

可以试一下,把打包工具重新install一下。重新打包。不行在换一种打包工具。

§对你不离不弃 2022-09-19 03:21:14

报错写的很明白,是/Applications/XAMPP/xamppfiles/htdocs/vue-electron-seat/build/win-unpacked/resources/app.asar文件不存在,你要修改你的相应配置或者保证在那个位置有对应的文件啊。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文