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

DuplicateOutputPath

DuplicateOutputPath

Error message

DuplicateOutputPath

What it means

Sentinel bundler variant: two output entries (chunks/assets) resolved to the same output file path, which would overwrite one with the other. Usually duplicate entry names or two assets with identical names.

Solutions

  1. Change naming templates ([dir]/[name].[ext], hashing) so entries don't collide
  2. Rename duplicate entry points or source files that normalize to the same output name
  3. Split outputs into separate outdirs per target
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/bundler/error.rs:19 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/8cbfebfa006d5d72. Report an issue: GitHub.

Appendix: source

Thrown at src/bundler/error.rs:19

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

View on GitHub (pinned to 8c5296ac45)