Closed kurohoan closed 1 year ago
The log suggests it might be a wrong configuration. So without any knowledge of your project, I can't help you.
So please provide the config and other project information.
Thank you. Provides a configuration file.
vue.config.js
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
publicPath: './',
pluginOptions: {
electronBuilder: {
nodeIntegration: true,
externals: ['electron'],
builderOptions: {
productName: "test",
files: [
`dist/**/*`,
`node_modules/**/*`,
`package.json`,
`background.js`
],
appId: "biz.test",
"publish": [
{
"provider": "github",
"owner": "kurohoan",
"repo": "test"
}
],
win: {
"icon": 'src/assets/icon.png',
"target": "nsis",
"publish": ["github"],
},
mac: {
"icon": 'src/assets/icon.png',
"target": 'dmg',
"publish": ["github"],
}
}
}
},
configureWebpack: {
devtool: 'source-map',
externals: {
},
optimization: {
minimize: false
},
performance: { hints: false },
},
})
package.json
{
"name": "test",
"version": "0.1.0",
"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",
"publish_win": "electron-builder --win -p always",
"publish_mac": "electron-builder --mac -p always"
},
"main": "background.js",
"dependencies": {
"core-js": "^3.8.3",
"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"
]
}
You are using Vue3, which is not supported by this v2 releases of this project. An v3-alpha version of this project should work with Vue3. But I do not provide support for that.
So what can be done about it?
Sorry, I don't provide support the v3-alpha version of this project. My time is limited. Maybe somebody else can help you.
Another option is to use Vue2. In that case I can help you.
I don't understand, can I choose a version called v3+alpha as the version I can choose in the vue cli?
There were various misconfigurations.
electron-builder --win -p always
If you run the above command and try to publish, you will receive the following error What is the cause?