Builder couldn't find the background.js file in resources/app.asar
tbhaxor opened this issue · comments
Gurkirat Singh commented
Describe the bug
Error I am getting
Error: Application entry file "background.js" in the "/mnt/Projects/electron/dist_electron/linux-unpacked/resources/app.asar" does not exist. Seems like a wrong configuration.
To Reproduce
- Install starter vue app with
"vue-cli-plugin-electron-builder": "3.0.0-alpha.4",
version - Configure the script with following config
const { defineConfig } = require("@vue/cli-service");
const { EnvironmentPlugin } = require("webpack");
module.exports = defineConfig({
pluginOptions: {
electronBuilder: {
extends: null,
nodeIntegration: false,
preload: {
common: "electron/preloads/common.js",
},
mainProcessFile: "electron/background.js",
builderOptions: {
appId: "com.app.app",
productName: "App",
artifactName: "${productName}-v${version}.${ext}",
win: {
target: ["nsis"],
},
linux: {
target: ["AppImage"],
category: "Utility",
},
mac: {
target: ["dmg", "zip"],
icon: "electron/build-rsrc/icon.png",
hardenedRuntime: true,
gatekeeperAssess: false
},
afterSign: 'scripts/notorize.js',
dmg: {
title: "Install ${productName} v${version}",
},
},
},
},
chainWebpack: (config) => {
config.plugin("process.env").use(EnvironmentPlugin);
config.output.hashFunction("sha256");
},
transpileDependencies: true,
lintOnSave: false,
});
Expected behavior
It should build app
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- custom config for vcp-electron-builder: Shared already
- (if possible) link to your repo:
- terminal output from running
vue info
: not issue with vuejs
Additional context
Add any other context about the problem here.
Gurkirat Singh commented
Fixed by removing main
key in package.json