oven-sh/bun · error · bun_bundler::Error

MultipleOutputFilesWithoutOutputDir

MultipleOutputFilesWithoutOutputDir

Error message

MultipleOutputFilesWithoutOutputDir

What it means

Sentinel variant of the bundler Error enum: multiple output files were produced (or requested via multiple entry points/assets) but no --outdir was given, so the bundler has nowhere to place them. Using stdout/inline output only supports a single file; consumers match on the variant name.

Solutions

  1. Set `outdir` in the bundler config or pass --outdir on the CLI
  2. Reduce the build to a single output file if no directory is desired
  3. Explicitly name a single outfile for single-entry builds
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/bundler/error.rs:21 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/17d0c8e4635969f1. Report an issue: GitHub.

Appendix: source

Thrown at src/bundler/error.rs:21

    #[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")]
    InvalidNativePlugin,
    #[error("EmptyAST")]
    EmptyAST,
    #[error("FormatError")]
    FormatError,
    #[error("ResolveMessage")]

View on GitHub (pinned to 8c5296ac45)