# electron + vue 打包linux应用报错记录
## icon图标导致的报错
```txt
⨯ unkNown output format set
github.com/develar/app-builder/pkg/icons.convertSingleFile
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:305
github.com/develar/app-builder/pkg/icons.doConvertIcon
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:247
github.com/develar/app-builder/pkg/icons.ConvertIcon
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:56
github.com/develar/app-builder/pkg/icons.ConfigureCommand.func1
/Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:33
github.com/alecthomas/kingpin.(*actionMixin).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/actions.go:28
github.com/alecthomas/kingpin.(*Application).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:557
github.com/alecthomas/kingpin.(*Application).execute
/Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:390
github.com/alecthomas/kingpin.(*Application).Parse
/Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:222
main.main
/Volumes/data/Documents/app-builder/main.go:90
runtime.main
/usr/local/Cellar/go/1.14.5/libexec/src/runtime/proc.go:203
runtime.goexit
/usr/local/Cellar/go/1.14.5/libexec/src/runtime/asm_amd64.s:1373
⨯ Cannot cleanup:
Error #1 --------------------------------------------------------------------------------
Error: /root/node/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/root/node/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
Error #2 --------------------------------------------------------------------------------
Error: /root/node/lib/node_modules/electron-builder/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/root/node/lib/node_modules/electron-builder/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) stackTrace=
```
### win打包的应用图标,在vue.config.js这样设置就ok

>但是在linux中这样打包必定爆上面的错误
### 在linux中必需
- 先在**background.js**中创建窗口时引入一张图标

- 然后再到**vue.config.js**中

>这里十分奇怪为何引入的只是**文件夹而不是文件**
[参考的文章https://blog.csdn.net/chenqk_123/article/details/112962391](https://blog.csdn.net/chenqk_123/article/details/112962391)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。