electron-installer-debian: Error generating DEB with version 1.1.0
What version of electron-installer-debian are you using?
1.1.0
What version of node and npm are you using?
node -v v11.6.0
npm -v 6.5.0
What operating system are you using? Linux Mint 19.1 Tessa, having Ubuntu 18.04 as base.
Can you compile the example app successfully?
If not, paste here the output of the following commands:
$ git clone https://github.com/electron-userland/electron-installer-debian.git
$ cd electron-installer-debian/example
$ DEBUG='electron-installer-debian' npm run build
What did you do? Please include the configuration you are using for electron-installer-debian.
In order to create a *.deb from my electron project, I executed the npm script calls, first yarn build then yarn deb64. My script setting is:
"scripts": {
"start": "electron .",
"build": "electron-packager . app --platform linux --arch x64 --out dist/",
"deb64": "electron-installer-debian --src dist/app-linux-x64/ --dest dist/installers/ --arch amd64"
},
What did you expect to happen?
I expected to get a *.deb file in dist/installers.
What actually happened? I got an error:
$ electron-installer-debian --src dist/app-linux-x64/ --dest dist/installers/ --arch amd64 Creating package (this may take a while) Error: Error creating contents of package: Error creating binary symlink: could not find the Electron app binary at “dist/app-linux-x64/administration”. You may need to re-bundle the app using Electron Packager’s “executableName” option. at err (/home/jean/Documents/NewProject/administration/node_modules/electron-installer-common/src/error.js:12:13)
Error: Error creating contents of package: Error creating binary symlink: could not find the Electron app binary at "dist/app-linux-x64/administration". You may need to re-bundle the app using Electron Packager's "executableName" option.\n at err (/home/jean/Documents/NewProject/administration/node_modules/electron-installer-common/src/error.js:12:13)error Command failed with exit code 1.
So, the path dist/app-linux-x64/administration obviously does not exist. It should be asking for dist/app-linux-x64 instead. The project’s name is called "name": "administration",, so there might be a mix up in electron-installer-debian version 1.1.0.
I solved this matter by moving one version down to electron-installer-debian version 1.0.1. Now everything works perfectly. I get the *.deb file as expected.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (5 by maintainers)
Commits related to this issue
- fix: name and config.forge.packagerConfig.name should be the same https://github.com/electron-userland/electron-installer-debian/issues/175#issuecomment-486952647 — committed to tiddly-gittly/TidGi-Desktop by linonetwo 3 years ago
- Another possible solution https://github.com/electron-userland/electron-installer-debian/issues/175#issuecomment-1558131497 — committed to richrace/arctis-monitor by richrace a year ago
After reading docs and on multiple failure, successfully builded by Keeping
nameinpackaje.jsonand electron-packager . app <-- thisapp(electron app name ) and package.jsonnameshould be same case sensitiveHappy Coding!
Both names in packager config and main package info should be the same on your package.json if you are using electron-forge on debian.
Just a small note that might be of assistance to someone:
When using electron-forge, and in the case when
nameandproductNamehave different values,electron-installer-debianwill try to copy bin from the wrong place (due to defaults that uses package.name), so you need to specifybinproperty in your maker options like this:If you need to specify both the name in package.json and in the packager config in Forge, that sounds like either a bug or a problem with documentation, which should be fixed.
Yes, I see why:
You’re specifying the Electron application name in the command line parameters (
app) instead of letting Electron Packager infer it from thenamefield inpackage.json.electron-installer-debianinfers the name in the same way.See the Electron Packager API docs. (A brief description is also available if you run
$(npm bin)/electron-packager --help.)