DioxusLabs/dioxus · error
Bun failed to generate bindings for
Error message
Bun failed to generate bindings for {:?}. What it means
`bun build` launched successfully but exited with a non-zero status, meaning the bundling of the TypeScript input itself failed (syntax errors, unresolved imports, etc.). The build script panics with the input path after checking status.success().
Solutions
- Bun failed to generate bindings for the module. Verify the module path and bun installation, then rebuild.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at packages/lazy-js-bundle/src/lib.rs:195 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/9500405717ef7236.
Report an issue: GitHub.
Appendix: source
Thrown at packages/lazy-js-bundle/src/lib.rs:195
let status = match status {
Ok(status) => status,
Err(error) => {
if Command::new("bun").status().is_ok() {
panic!(
"Bun failed to generated bindings for {:?}. Error:\n{:?}",
input_path, error
);
} else {
panic!(
"Make sure you have Bun installed. Failed to generate bindings for {:?}. Error:\n{:?}",
input_path, error
);
}
}
};
if !status.success() {
panic!("Bun failed to generate bindings for {:?}.", input_path);
}
}
View on GitHub (pinned to 24f6a829df)