Tauri "failed to run custom build command for app" in CI
The Tauri app crate runs tauri-build in build.rs to embed icons, the frontend, and config. When that script errors (a missing icon, an absent frontend dist, or a bad tauri.conf.json), cargo reports "failed to run custom build command for app".
What this error means
cargo/tauri build fails with "error: failed to run custom build command for app v0.0.0 (...)" and a build-script trace naming the underlying problem.
error: failed to run custom build command for `app v0.1.0`
Caused by:
process didn't exit successfully: `.../build-script-build` (exit status: 1)
--- stderr
The icon icons/icon.ico is missingCommon causes
A required icon or asset is missing
tauri-build embeds platform icons; a missing icon.ico or icon.icns fails the build script.
The frontend dist was not built
frontendDist (or distDir) points at a folder the CI frontend build did not produce yet.
How to fix it
Build the frontend before tauri build
- Run the web build that produces the dist directory tauri expects.
- Generate icons if they are missing with
tauri icon. - Then run the tauri build.
npm run build # produces dist/
npx tauri buildRead the build-script stderr
The "--- stderr" block names the exact missing file or config field; fix that specific item and re-run.
How to prevent it
- Order the frontend build before
tauri buildin CI. - Commit the required icon set or generate it in CI.
- Validate tauri.conf.json paths point at real output.