{"record":{"id":"9500405717ef7236","repo":"DioxusLabs/dioxus","slug":"bun-failed-to-generate-bindings-for","errorCode":null,"errorMessage":"Bun failed to generate bindings for {:?}.","messagePattern":"Bun failed to generate bindings for (.+?)\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/lazy-js-bundle/src/lib.rs","lineNumber":195,"sourceCode":"    let status = match status {\n        Ok(status) => status,\n        Err(error) => {\n            if Command::new(\"bun\").status().is_ok() {\n                panic!(\n                    \"Bun failed to generated bindings for {:?}. Error:\\n{:?}\",\n                    input_path, error\n                );\n            } else {\n                panic!(\n                    \"Make sure you have Bun installed. Failed to generate bindings for {:?}. Error:\\n{:?}\",\n                    input_path, error\n                );\n            }\n        }\n    };\n\n    if !status.success() {\n        panic!(\"Bun failed to generate bindings for {:?}.\", input_path);\n    }\n}\n","sourceCodeStart":177,"sourceCodeEnd":198,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/lazy-js-bundle/src/lib.rs#L177-L198","documentation":"`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().","triggerScenarios":"Thrown at packages/lazy-js-bundle/src/lib.rs:195 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Bun failed to generate bindings for the module. Verify the module path and bun installation, then rebuild."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}