Open Flavsditz opened 2 years ago
You are using v3 alpha. You have to remove the main
field from your package.json
to fix that. See https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1637#issuecomment-1006978695
hey have you managed to fixed it I am getting similar issue here is my vue.config.js
module.exports = {
pluginOptions: {
electronBuilder: {
//outputDir: '../dist_electrons',
preload: './src/preload.js',
// Or, for multiple preload files:
// preload: { preload: 'src/preload.js', otherPreload: 'src/preload2.js' }
builderOptions: {
appId: 'com.linerai.liner',
afterSign: "./afterSignHook.js",
"extraResources": [{
"from": process.env.BACKEND_BUILD_PATH ,
"to": "core",
"filter": [
"**/*",
"!dist_electron${/*}"
]
}],
"files": [
"**/*"
], // access via path.join(path.dirname(__dirname), 'liner_core' );
"win": {
"icon" : "build/Icon-1024.png" ,
"target": {
"target": "NSIS",
"arch": [
process.arch
]
}
},
"mac": {
"icon" : "build/Icon-1024.png" ,
"hardenedRuntime": true,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"minimumSystemVersion": "12.3.0",
"extendInfo": {
"LSMinimumSystemVersion": "12.3.0"
} ,
"target": {
"target": "dmg",
"arch": [
"arm64" //'arm64' , 'x64'
]
}
}
}
}
}
}
and here is my package.json
{
"name": "ClownIdea",
"version": "1.5.1",
"build_number": "0016",
"website": "https://clownidea.com",
"description": "ClownIdea - Stable Diffusion App.",
"is_dev": false,
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"serve:ui": "vue-cli-service serve ./src/main_demoui.js",
"build:ui": "vue-cli-service build ./src/main_demoui.js",
"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": {
"@codekraft-studio/vue-record": "^0.0.3",
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/vue-fontawesome": "^2.0.6",
"apexcharts": "^3.33.0",
"bootstrap": "^5.1.3",
"bootstrap-vue": "^2.21.2",
"chart.js": "^2.9.4",
"core-js": "^3.6.5",
"electron-context-menu": "^3.5.0",
"electron-localshortcut": "^3.2.1",
"electron-notarize": "^1.2.1",
"electron-settings": "^4.0.2",
"fuse.js": "^6.6.2",
"javascript-time-ago": "^2.3.13",
"konva": "^8.3.13",
"nsfwjs": "^2.4.2",
"v-click-outside": "^3.1.2",
"vue": "^2.6.11",
"vue-apexcharts": "^1.6.2",
"vue-chartjs": "^3.5.1",
"vue-click-outside": "^1.1.0",
"vue-inline-svg": "^2.1.0",
"vue-spinner": "^1.0.4",
"vue-toast-notification": "^0.6.3",
"vue-unicons": "^3.3.1",
"vue-web-cam": "^1.9.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"electron": "^13.0.0",
"electron-builder": "^23.3.3",
"electron-devtools-installer": "^3.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-cli-plugin-electron-builder": "~2.1.1",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
When I extracted app.asrar I have only node_modules and no other files
Ok, I am losing my mind on this one. xD
My problem, it seems, that the
background.ts
file is not even being compiled to thedist_electron/bundled
folder.Serve
works fine... butbuild
does not. It was working for some time, but then suddenly (probably after updates on deps ) the dev-tools stopped working. So I managed to fix it. Thenserve
broke, I fixed that... nowbuild
stopped working...Here is my env: Node v16.13.0 NPM v8.12.2
Here is my
package.json
and here is the
vue.config.js
:Here is the file structure that gets generated upon build: dist_electron ├── bundled │ ├── css │ ├── favicon.ico │ ├── fonts │ ├── icon.png │ ├── img │ ├── index.html │ ├── index.js │ ├── index.js.LICENSE.txt │ ├── js │ ├── node_modules │ └── package.json
I know there was a similar issue (#118) but I went through the entire thread and none of those were my issues. I am sincerely at a loss at the moment. Anything else I can provide? I appreciate the help