trunk "wasm-bindgen ... is not installed" in CI
trunk downloads the wasm-bindgen CLI on demand to post-process the wasm output. If the download fails or no matching release exists for the runner, trunk stops before it can emit the bundle.
What this error means
trunk build fails with "error: failed to download ... wasm-bindgen" or "wasm-bindgen is not installed", often after the cargo build already finished.
2026-06-30T10:12:04 [ERROR] error from build pipeline
Caused by:
0: error applying wasm-bindgen
1: failed to download wasm-bindgen v0.2.92
2: request failed with status 404 Not FoundCommon causes
No prebuilt wasm-bindgen for the runner
trunk requests a specific wasm-bindgen release; if none is published for the runner OS/arch, the download 404s and the pipeline fails.
Network restrictions block the download
A locked-down runner cannot reach the release host, so trunk cannot fetch the CLI it needs at build time.
How to fix it
Preinstall a matching wasm-bindgen-cli
- Install wasm-bindgen-cli at the version trunk expects before running trunk.
- Ensure it is on PATH so trunk uses it instead of downloading.
- Re-run
trunk build.
cargo install -f wasm-bindgen-cli --version 0.2.92
trunk build --releaseUse the trunk setup action
A dedicated action installs trunk and its tool dependencies with prebuilt binaries.
- uses: jetli/trunk-action@v0.5.0
with:
version: 'latest'How to prevent it
- Preinstall wasm-bindgen-cli so trunk never downloads at build time.
- Pin tool versions in your workflow so a missing release is caught.
- Cache the cargo bin directory to keep the CLI present.