Vue-cli-plugin-electron-builder: after build only white background window shows up when i run the app.exe

Created on 7 Jun 2018  路  15Comments  路  Source: nklayman/vue-cli-plugin-electron-builder

yarn serve:electron works just fine
yarn build:electron, the build just finishes fine without any errors but when i run the app, it shows a blank window. using buefy and windows os.

Most helpful comment

Make sure to disable history mode on your router for electron builds. Other than that I have no idea.

All 15 comments

Can you include steps for reproduction as I am unable to replicate the error. Make sure you are using the latest version of vue-cli.

vue create app-electron

  • manually select features
    select
    Babel
    Progressive Web App (PWA) support
    Router
    VueX
    CSS Pre-processors
    Linter / Formatter
    E2E Testing
  • then choose
    SCSS/SASS

  • then choose
    Eslint with error prevention only

  • thenc choose
    lint on save

  • then Cypress (Chrome only)

  • then choose
    In dedicated config files

  • vue add electron-builder

  • yarn build:electron

those are the steps to reproduce the issue

Follow the instructions here to add sass/scss support, it should work then. Please close this issue if it does.

node-sass sass-loader are installed out of the box with vue, that does not solve the issue.
sass

Not sure why it isn't working. For now, just use regular build/serve until v1.0.0 comes out which will fix this issue. A beta should be released in about 1-2 weeks.

thanks.

I'm running into the same issue. I have attached my package.json. Folder structure is identical to the guide. Using > 1.0.0 and the issue remains.

image

I am just wondering if this is a known bug and if we should reopen the issue

It works fine for me, can you provide reproduction instructions that work on a fresh project?

Try upgrading to 1.0.0-rc.2, I think that would fix the issue.

@nklayman , sure I'll run a fresh project and see what happens there. I may find my bug in the process anywho. If the bug remains, I will update you. If not, I will update my comment. Thanks for the diligence.

@nklayman Just ran a fresh vue cli 3 project with vue-router. No blank screen and routes fine. Now I am really spinning my wheels. Serves fine in my existing project but blank screen in the build. The only other dependencies I have are buefy, vuex, and vuefire.

Update: removed node-sass and sass-loader seemed to fix the issue. Any insight was to why?

Make sure to disable history mode on your router for electron builds. Other than that I have no idea.

Disabling history mode solved this problem for me but I couldn't find this suggestion anywhere in the docs. Leaving this as a signpost for others :)

It's in there. It also notifies you when you add the plugin to a project using vue-router.

I had a similar issue. Please find my solution here.
https://github.com/ficonsulting/RInno/issues/107#issuecomment-494118785

Was this page helpful?
0 / 5 - 0 ratings