oven-sh/bun · error · bun_bundler::Error
PrintError
PrintError
Error message
PrintError
What it means
Sentinel for a failure while printing (serializing) the AST to output code. Parsing succeeded but code generation could not represent the program, often due to printer limitations or corrupted AST state.
Solutions
- Reduce the input to a minimal file that triggers the printer failure and report it
- Adjust minify/target options — some printer paths are option-dependent
- Retry the build to rule out a transient state issue
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/bundler/error.rs:15 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/f97a0016a9539fe4.
Report an issue: GitHub.
Appendix: source
Thrown at src/bundler/error.rs:15
#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
pub enum Error {
#[error("InvalidRecordKind")]
InvalidRecordKind,
#[error("ModuleNotFound")]
ModuleNotFound,
#[error("BuildFailed")]
BuildFailed,
#[error("CompilationFailed")]
CompilationFailed,
#[error("Plugin")]
Plugin,
#[error("InvalidCssImport")]
InvalidCssImport,
#[error("PrintError")]
PrintError,
#[error("WriteFailed")]
WriteFailed,
#[error("DuplicateOutputPath")]
DuplicateOutputPath,
#[error("MultipleOutputFilesWithoutOutputDir")]
MultipleOutputFilesWithoutOutputDir,
#[error("InvalidJSON")]
InvalidJSON,
#[error("Fail")]
Fail,
#[error("ParserError")]
ParserError,
#[error("SyntaxError")]
SyntaxError,
#[error("MinifyError")]
MinifyError,
#[error("InvalidNativePlugin")]View on GitHub (pinned to 8c5296ac45)