oven-sh/bun · error · bun_bundler::Error
Plugin
Plugin
Error message
Plugin
What it means
Sentinel bundler variant indicating an error raised by a user plugin (onLoad/onResolve callback threw or signalled failure). The plugin's own message is carried elsewhere; this tag classifies the failure source.
Solutions
- Inspect the plugin's returned error message to find the faulting hook
- Guard the plugin code in try/catch and return a meaningful error result
- Disable the plugin to confirm it is the source of the failure
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/bundler/error.rs:11 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/3e61ac7e92410f2d.
Report an issue: GitHub.
Appendix: source
Thrown at src/bundler/error.rs:11
#[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")]View on GitHub (pinned to 8c5296ac45)