SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.47k stars 1.55k forks source link

it is blank screen after run it by build #398

Closed chyroc closed 7 years ago

chyroc commented 7 years ago
Describe the issue / bug.

if i run it by npm run dev, it is ok

if i build it with npm build and run it, it is not ok.(mac and windows have the same error -- blank screen)

How can I reproduce this problem?

yes,you can do something below:

  1. vue init simulatedgreg/electron-vue my_eletron_vue

and my config is

? Application Name my_eletron_vue
? Project description An electron-vue project
? Select which Vue plugins to install vue-electron, vue-router
? Use linting with ESLint? No
? Setup unit testing with Karma + Mocha? No
? Setup end-to-end testing with Spectron + Mocha? No
? What build tool would you like to use? packager
? author Chyroc <chen_yunpeng@foxmail.com>
  1. cd my_eletron_vue
  2. yarn
  3. npm run dev, it is ok
  4. npm build or npm run build:darwin,it is blank
If visual, provide a screenshot.

image

Tell me about your development environment.
chyroc commented 7 years ago

if you can give some suggestion, thank you very much.

SimulatedGREG commented 7 years ago

@Chyroc

Sorry for the trouble you are running into. The use of electron-packager is unfortunately very buggy right now, due to horrible npm bugs. I would highly suggest trying to use electron-builder as many of the issues are handled much better.

If you really need electron-packager, then I would suggest trying to use npm@5.2.0 or maybe settings the package manager to use yarn. Hope this helps.

Related: #348