Search code examples
electrongitlab-cigitlab-ci-runnerelectron-forge

Electron forge maker fail when target zip on `GitLab CI`


This error is only caused when electron forge maker runs on GitLab CI:

Making for the following targets: zip
 - Making for target: zip - On platform: linux - For arch: x64
 ✖ Making for target: zip - On platform: linux - For arch: x64
 An unhandled error has occurred inside Forge:
 An error occured while making for target: zip
 spawn zip ENOENT
 Error: spawn zip ENOENT
     at Process.ChildProcess._handle.onexit (node:internal/child_process:281:19)
     at onErrorNT (node:internal/child_process:481:16)
     at processTicksAndRejections (node:internal/process/task_queues:81:21)
 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
 error Command failed with exit code 1.
 ERROR: Job failed: command terminated with exit code  1


Solution

  • Run the following command to install zip inside your pipeline

    apt-get update && apt-get install --no-install-recommends zip