nklayman / vue-cli-plugin-electron-builder

Easily Build Your Vue.js App For Desktop With Electron

Home Page:https://nklayman.github.io/vue-cli-plugin-electron-builder/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue CLI Plugin Electron Builder shows complete blank screen on build

kurohoan opened this issue · comments

#954

I assume you have the same symptoms as above.
File does not exist in "src/router".
Which file should I edit?

Vue3 is used.

What version of the plugin?

package.json

{
  "name": "test",
  "version": "0.1.2",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "electron:build": "vue-cli-service electron:build",
    "electron:serve": "vue-cli-service electron:serve",
    "postinstall": "electron-builder install-app-deps",
    "postuninstall": "electron-builder install-app-deps"
  },
  "main": "background.js",
  "dependencies": {
    "core-js": "^3.8.3",
    "electron-updater": "^5.3.0",
    "vue": "^3.2.13"
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "electron": "^13.0.0",
    "electron-devtools-installer": "^3.1.0",
    "eslint": "^7.32.0",
    "eslint-plugin-vue": "^8.0.3",
    "vue-cli-plugin-electron-builder": "~2.1.1"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/vue3-essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "@babel/eslint-parser"
    },
    "rules": {}
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead",
    "not ie 11"
  ]
}

When using Vue3, you need v3-alpha version of this plugin. Though I don't provide support for that version.

For which plug-ins is the v3-alpha version required?
Which plug-ins are not supported?

When using Vue v3, you need the v3-alpha version of THIS plugin, the vue-cli-plugin-electron-builder.

Does this mean that the Vue CLI plugin cannot select Vue3-alpha?

There is no need for Vue to be run as Alpha....

I don't know what you mean when you say.
If it's only available in v3-alpha, how do you get it?

Change the required version in your package.json...

I understand what you are saying.
When I do "vue add vue add electron-builder" from the Vue CLI, I can't select alpha.

"vue-cli-plugin-electron-builder": "3.0.0-alpha.3"

I switched the plugin to the above version and reinstalled it, but now I get the following error when I npm run electron:build.
Do you know what causes this?

Error: Application entry file "background.js" in the "C:\***\test\dist_electron\win-unpacked\resources\app.asar" does not exist. Seems like a wrong configuration.
    at error (C:\***\test\node_modules\app-builder-lib\src\asar\asarFileChecker.ts:7:12)
    at Object.checkFileInArchive (C:\***\test\node_modules\app-builder-lib\src\asar\asarFileChecker.ts:31:11)     
    at WinPackager.checkFileInPackage (C:\***\test\node_modules\app-builder-lib\src\platformPackager.ts:501:7)    
    at WinPackager.sanityCheckPackage (C:\***\test\node_modules\app-builder-lib\src\platformPackager.ts:549:5)    
    at WinPackager.doPack (C:\***\test\node_modules\app-builder-lib\src\platformPackager.ts:310:5)
    at WinPackager.pack (C:\***\test\node_modules\app-builder-lib\src\platformPackager.ts:136:5)
    at Packager.doBuild (C:\***\test\node_modules\app-builder-lib\src\packager.ts:441:9)
    at Object.executeFinally (C:\***\test\node_modules\builder-util\src\promise.ts:12:14)
    at Packager._build (C:\***\test\node_modules\app-builder-lib\src\packager.ts:376:31)
    at Packager.build (C:\***\test\node_modules\app-builder-lib\src\packager.ts:337:12)
    at Object.executeFinally (C:\***\test\node_modules\builder-util\src\promise.ts:12:14)