Skip to content

Cannot build rpm and deb on macOS #9265

@LightningAssist

Description

@LightningAssist

Versions:

  • Node: 22.14.0
  • Electron Builder: 26.0.18
  • Electron: 37.2.0
  • mac version: Sequoia 15.3.2

What I did

Running electron-builder with bundled fpm to produce Linux .deb packages on macOS:

npx electron-builder --linux deb --arm64 --publish=never

Expected

.deb artifact generated successfully.

Actual

Build fails with ERR_ELECTRON_BUILDER_CANNOT_EXECUTE.
fpm process exits with code null (no explicit error).

⨯ Cannot cleanup:

Error #1 --------------------------------------------------------------------------------
Error: .../electron-builder/fpm@2.0.1/fpm-1.16.0-ruby-3.4.3-darwin-arm64/fpm process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code: null
Command failed: .../fpm -s dir --force -t deb \
  -d libgtk-3-0 -d libnotify4 -d libnss3 -d libxss1 -d libxtst6 -d xdg-utils \
  -d libatspi2.0-0 -d libuuid1 -d libsecret-1-0 \
  --deb-recommends libappindicator3-1 \
  --deb-compression xz \
  --architecture amd64 \
  --description "App" \
  --version 2.0.0 \
  --package release/build/app_2.0.0_amd64.deb \
  --name app \
  --maintainer "App Maintainer <support@example.com>" \
  --url https://github.com/example/app \
  --vendor "App Vendor <support@example.com>" \
  --deb-priority optional \
  --license MIT \
  release/build/linux-unpacked/=/opt/App \
  assets/icons/png/256x256.png=/usr/share/icons/hicolor/256x256/apps/app.png \
  <temp>/8-app.desktop=/usr/share/applications/app.desktop


Error #2 --------------------------------------------------------------------------------
Error: .../electron-builder/fpm@2.0.1/fpm-1.16.0-ruby-3.4.3-darwin-arm64/fpm process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code: null
Command failed: .../fpm -s dir --force -t deb \
  -d libgtk-3-0 -d libnotify4 -d libnss3 -d libxss1 -d libxtst6 -d xdg-utils \
  -d libatspi2.0-0 -d libuuid1 -d libsecret-1-0 \
  --deb-recommends libappindicator3-1 \
  --deb-compression xz \
  --architecture armhf \
  --description "App" \
  --version 2.0.0 \
  --package release/build/app_2.0.0_armv7l.deb \
  --name app \
  --maintainer "App Maintainer <support@example.com>" \
  --url https://github.com/example/app \
  --vendor "App Vendor <support@example.com>" \
  --deb-priority optional \
  --license MIT \
  release/build/linux-armv7l-unpacked/=/opt/App \
  assets/icons/png/256x256.png=/usr/share/icons/hicolor/256x256/apps/app.png \
  <temp>/a-app.desktop=/usr/share/applications/app.desktop
"linux": {
    "icon": "./icons/png/256x256.png",
    "target": [
      {
        "target": "AppImage",
        "arch": [
          "x64",
          "armv7l",
          "arm64"
        ]
      },
      {
        "target": "deb",
        "arch": [
          "x64",
          "armv7l",
          "arm64"
        ]
      },
      {
        "target": "rpm",
        "arch": [
          "x64",
          "armv7l",
          "arm64"
        ]
      }
    ],
    "executableName": "app",
    "desktop": {
      "entry": {
        "Name": "app"
      }
    },
    "category": "Development",
    "mimeTypes": [
      "x-scheme-handler/com.app"
    ]
  },

Notes

This happens consistently on macOS.
Building on Ubuntu works fine, but i need on macOS.
Using bundled fpm (not system fpm).
.deb artifacts are never generated (ENOENT).
AppImage build works fine. Only deb and rpm doesn't work.

i've managed to make it work for .deb only on 26.0.12 by clearing the cache on the whole mac for electron-builder.

But when i try to build for rpm i still get that error.

FPM_DEBUG=true flag
With this flag i see:

{:timestamp=>"2025-08-28T22:40:19.306649+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: /var/folders/5r/lg_rg37d5qjfswtkgq59ws7h0000gn/T/package-rpm-build-63bc60a68dc8731719c4ba03dcd62cf5c8d475b5362ebc7738115fc16300/BUILD/lightning-assist-2.0.0-build/BUILDROOT/opt/Lightning?Assist/resources/assets/icons/png/80x80.png"}
{:timestamp=>"2025-08-28T22:40:19.306687+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/icons/png/87x87.png"}
{:timestamp=>"2025-08-28T22:40:19.306730+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/icons/png/88x88.png"}
{:timestamp=>"2025-08-28T22:40:19.306752+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/icons/png/92x92.png"}
{:timestamp=>"2025-08-28T22:40:19.306788+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/icons/png/Contents.json"}
{:timestamp=>"2025-08-28T22:40:19.306847+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/icons/win/icon.ico"}
{:timestamp=>"2025-08-28T22:40:19.306883+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/manifest.json"}
{:timestamp=>"2025-08-28T22:40:19.306935+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/ms-icon-144x144.png"}
{:timestamp=>"2025-08-28T22:40:19.306973+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/ms-icon-150x150.png"}
{:timestamp=>"2025-08-28T22:40:19.307024+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/ms-icon-310x310.png"}
{:timestamp=>"2025-08-28T22:40:19.307081+0300", :level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe", 
 :message=>"File not found: .../BUILDROOT/opt/Lightning?Assist/resources/assets/ms-icon-70x70.png"}

I have a lot of this "File not found". Is it because of the space of the productName?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions