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."
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
- Run the compile/bundle step that emits the file named in
main. - Then invoke electron-builder.
- Confirm the entry exists at the configured path.
npm run build # emits dist/main/index.js
npx electron-builder --publish neverInclude the entry in the files filter
Ensure the build files config packs the compiled main and renderer output.
"build": {
"files": ["dist/**/*", "package.json"]
}How to prevent it
- Keep
mainpointed at the actual compiled entry. - Run the bundle step in CI before electron-builder.
- Verify the
filesglobs include built output.