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

TooRecentVersion

Error message

TooRecentVersion

What it means

The lockfile (or manifest) was written by a NEWER Bun version than the running one, so its format/features cannot be understood. It fires during lockfile parsing when the stored lockfile version exceeds the version this binary supports.

Solutions

  1. Upgrade Bun to at least the version that created the lockfile (check `bun --version` vs the lockfileVersion field)
  2. Delete bun.lock and let the current Bun version regenerate it — only if teammates are also upgraded
Defensive patterns

Strategy: fallback

When it happens

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

Appendix: source

Thrown at src/install/error.rs:61

    #[error("UnexpectedNotModified")]
    UnexpectedNotModified,
    #[error("PackageFailedToParse")]
    PackageFailedToParse,
    #[error("BufferTooSmall")]
    BufferTooSmall,
    #[error("DanglingSymlink")]
    DanglingSymlink,
    #[error("UnsupportedYarnLockfileVersion")]
    UnsupportedYarnLockfileVersion,
    #[error("InvalidPackageJSON")]
    InvalidPackageJSON,
    #[error("LockfileResolveFailed")]
    LockfileResolveFailed,
    #[error("DistTagNotFound")]
    DistTagNotFound,
    #[error("NoMatchingVersion")]
    NoMatchingVersion,
    #[error("TooRecentVersion")]
    TooRecentVersion,
    #[error("MissingPackageJSON")]
    MissingPackageJSON,
    #[error("InstallFailed")]
    InstallFailed,
    #[error("HTTPError")]
    HTTPError,
    #[error("Failed")]
    Failed,
    #[error("UnrecognizedDependencyFormat")]
    UnrecognizedDependencyFormat,
    #[error("No global directory found")]
    NoGlobalDirectoryFound,
    #[error("InvalidPackageID")]
    InvalidPackageID,
    #[error("PartialInstallFailed")]
    PartialInstallFailed,
    #[error("NoPackagesInstalled")]

View on GitHub (pinned to 8c5296ac45)