vue-cli-plugin-electron-builder: Build not working for multiple browser windows

I seem to have the same problem as in: #102

Describe the bug When creating an application with more than one window, the build fails with message: Building modern bundle for production...(node:67207) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/.../dist_electron/bundled/legacy-assets-index.html.json'

To Reproduce Clone https://github.com/utoppo/vue-cli-plugin-electron-builder-build-problem Try to build with: yarn electron:build

Expected behavior Build/Bundling Process should finish without error.

Environment:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 17 (5 by maintainers)

Most upvoted comments

I fixed the missing legacy-assets-page.html.json bug with 1.1.1, and created a multipage demo app. Let me know if that works for you or if you have more questions.

It doesn’t work in our case! You should replace fileName to filename ! Changing name of option in vue.config.js does not help.

See: https://github.com/nklayman/vue-cli-plugin-electron-builder/commit/bafd557d8b11c2f6de3b600b2cd2fcbc4a6de351#r32880694

Otherwise we get errors and build never finishes:

Building modern bundle for production...(node:35823) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '.../dist_electron/bundled/legacy-assets-main.html.json'
(node:35823) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:35823) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠇  Building modern bundle for production...

This works great! Thank you very much for the fix and the example!

So I’ll reopen this, for @nklayman to have a look at the issue again. I thought my proposed solution would fix it, but it does look like the problem persists for others.