Skip to content
Latchkey

electron-builder "Application entry file does not exist" in CI

electron-builder packages the file named by main in package.json. If that compiled entry is missing from the app directory (because the build step did not run, or files filter excludes it), it stops with this error.

What this error means

electron-builder fails with "Application entry file \"dist/main.js\" in the \"...\" does not exist. Seems like a wrong configuration."

electron-builder
Error: Application entry file "dist/main/index.js" in the
"/home/runner/work/app/app/release/linux-unpacked/resources/app.asar"
does not exist. Seems like a wrong configuration.

Common causes

The main bundle was not compiled before packaging

package.json main points at a built file (for example dist/main/index.js) that the CI build step did not produce before electron-builder ran.

The files filter excluded the entry

A files glob in the build config does not include the compiled entry, so it is absent from the app.asar.

How to fix it

Build the app before packaging

  1. Run the compile/bundle step that emits the file named in main.
  2. Then invoke electron-builder.
  3. Confirm the entry exists at the configured path.
Terminal
npm run build      # emits dist/main/index.js
npx electron-builder --publish never

Include the entry in the files filter

Ensure the build files config packs the compiled main and renderer output.

package.json
"build": {
  "files": ["dist/**/*", "package.json"]
}

How to prevent it

  • Keep main pointed at the actual compiled entry.
  • Run the bundle step in CI before electron-builder.
  • Verify the files globs include built output.

Frequently asked questions

What causes ""Application entry file ... does not exist""?
package.json main points at a built file (for example dist/main/index.js) that the CI build step did not produce before electron-builder ran.
How do I fix "Application entry file ... does not exist"?
Build the app before packaging

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card