oven-sh/bun · error · Error

InvalidBinContent

Error message

InvalidBinContent

What it means

Sentinel variant of the install Error enum: a bin (executable) entry's contents are malformed — the name/target pair cannot be decoded as valid data. Sibling of InvalidBinCount, which covers an inconsistent entry count rather than bad entry content.

Solutions

  1. Regenerate bun.lock from package.json
  2. Check the package's bin field is a string or a map of strings
  3. Report reproducible parsing failures to Bun's GitHub issues
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/install/error.rs:213 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/3418e272d6fe1cee. Report an issue: GitHub.

Appendix: source

Thrown at src/install/error.rs:213

    #[error("Lockfile validation failed: invalid package meta")]
    LockfileValidationFailedInvalidPackageMeta,
    #[error("Lockfile validation failed: invalid bin tag")]
    LockfileValidationFailedInvalidBinTag,
    #[error("Lockfile validation failed: invalid package scripts")]
    LockfileValidationFailedInvalidPackageScripts,
    #[error("InvalidNPMLockfile")]
    InvalidNPMLockfile,
    #[error("NotSupported")]
    NotSupported,
    #[error("Unexpected")]
    Unexpected,
    #[error("NotSameFileSystem")]
    NotSameFileSystem,
    #[error("FailedToCopyFile")]
    FailedToCopyFile,
    #[error("InvalidBinCount")]
    InvalidBinCount,
    #[error("InvalidBinContent")]
    InvalidBinContent,

    #[error(transparent)]
    Sys(#[from] bun_errno::SystemErrno),
    #[error(transparent)]
    Alloc(#[from] bun_alloc::AllocError),
    #[error(transparent)]
    Core(#[from] bun_core::Error),
    #[error(transparent)]
    Resolver(#[from] bun_resolver::Error),
    #[error(transparent)]
    Spawn(#[from] bun_spawn::Error),
    #[error(transparent)]
    Http(#[from] bun_http::Error),
    #[error(transparent)]
    PackageManifest(#[from] crate::PackageManifestError),
    #[error(transparent)]
    Dotenv(#[from] bun_dotenv::Error),

View on GitHub (pinned to 8c5296ac45)