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

Most upvoted comments

Yes, I see why:

"build": "electron-packager . app --platform linux --arch x64 --out dist/",

You’re specifying the Electron application name in the command line parameters (app) instead of letting Electron Packager infer it from the name field in package.json. electron-installer-debian infers the name in the same way.

So what exactly is the Electron Packager’s executableName option?

See the Electron Packager API docs. (A brief description is also available if you run $(npm bin)/electron-packager --help.)

After reading docs and on multiple failure, successfully builded by Keeping name in packaje.json and electron-packager . app <-- this app (electron app name ) and package.json name should be same case sensitive

Happy Coding!

{
  "name": "forged-text",
...
  "config": {
    "forge": {
      "packagerConfig": {
        "name": "forged-text"
      }
....

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 name and productName have different values, electron-installer-debian will try to copy bin from the wrong place (due to defaults that uses package.name), so you need to specify bin property in your maker options like this:

{
    name: '@electron-forge/maker-deb',
    config: {
        options: {
            bin: appName, // same as productName

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.

After having a test installation of the resulting DEB file on a newly installed system I cannot find the application. It’s as if I didn’t install it at all.

Yes, I see why:

"build": "electron-packager . app --platform linux --arch x64 --out dist/",

You’re specifying the Electron application name in the command line parameters (app) instead of letting Electron Packager infer it from the name field in package.json. electron-installer-debian infers the name in the same way.

So what exactly is the Electron Packager’s executableName option?

See the Electron Packager API docs. (A brief description is also available if you run $(npm bin)/electron-packager --help.)