electron-builder: Electron-builder can't find app-builder-amd64 on GitHub Actions

  • Electron-Builder Version: 23.6.0
  • Node Version: 18
  • Electron Version: 23.0.0
  • Electron Type (current, beta, nightly): current
  • Target: mac

On github actions, the build fails and I get:

@codex/electron:build: > electron-builder build --publish never --config electron-builder.config.js --dir
@codex/electron:build: 
@codex/electron:build:   • electron-builder  version=23.6.0 os=21.6.0
@codex/electron:build:   • loaded configuration  file=/Users/runner/work/codex/codex/apps/electron/electron-builder.config.js
@codex/electron:build:   • description is missed in the package.json  appPackageFile=/Users/runner/work/codex/codex/apps/electron/package.json
@codex/electron:build:   • installing production dependencies  platform=darwin arch=x64 appDir=/Users/runner/work/codex/codex/apps/electron
@codex/electron:build:   • packaging       platform=darwin arch=x64 electron=23.0.0 appOutDir=dist/mac
@codex/electron:build:   ⨯ spawn /Users/runner/work/codex/codex/node_modules/app-builder-bin/mac/app-builder_amd64 ENOENT  failedTask=build stackTrace=Error: spawn /Users/runner/work/codex/codex/node_modules/app-builder-bin/mac/app-builder_amd64 ENOENT
@codex/electron:build:     at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
@codex/electron:build:     at onErrorNT (node:internal/child_process:476:16)
@codex/electron:build:     at processTicksAndRejections (node:internal/process/task_queues:82:21)

On my own Mac, the build succeeds and I get:

@codex/electron:build: > electron-builder build --publish never --config electron-builder.config.js --dir
@codex/electron:build:
@codex/electron:build:   • electron-builder  version=23.6.0 os=21.6.0
@codex/electron:build:   • loaded configuration  file=/Users/adam/code/codex/codex/apps/electron/electron-builder.config.js
@codex/electron:build:   • description is missed in the package.json  appPackageFile=/Users/adam/code/codex/codex/apps/electron/package.json
@codex/electron:build:   • rebuilding native dependencies  dependencies=classic-level@1.2.0 platform=darwin arch=x64
@codex/electron:build:   • packaging       platform=darwin arch=x64 electron=23.0.0 appOutDir=dist/mac
@codex/electron:build:   • asar usage is disabled — this is strongly not recommended  solution=enable asar and use asarUnpack to unpack files that must be externally available

I noticed that on my own computer, it says rebuilding native dependencies instead of installing production dependencies. I’m wondering if that’s what’s responsible and why that might be different. But it’s pretty unclear to me why app-builder_amd64 would simply be unavailable post install.

My ci.yml looks like:

name: CI

on:
  push:
    branches: ["main", "*_ci"]
  pull_request:
    types: [opened, synchronize]

jobs:
  build:
    name: Build and Test
    timeout-minutes: 15
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest]

    steps:
      - name: Check out code
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Setup Node.js environment
        uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: "npm"

      - name: Install dependencies
        run: npm install

      - name: Build
        run: npm run build

      - name: Test
        run: npm run test

Has anyone run into this issue before? Is there something simple I’m missing?

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (2 by maintainers)

Most upvoted comments

Please use 24.1.0. There’s a bug using entitlements in 24.0.0