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

LockfileResolveFailed

Error message

LockfileResolveFailed

What it means

The dependency resolver failed to resolve the dependency graph from the lockfile — a dependency entry in bun.lock could not be matched to a package or resolution strategy. It fires when lockfile data is inconsistent with the manifest or a resolution path is unsupported.

Solutions

  1. Delete bun.lock and regenerate it with a fresh `bun install`
  2. Verify dependency entries in package.json use supported protocols (npm, tarball, git, workspace, file)
  3. Upgrade Bun to a version that supports the resolution format in the lockfile
Defensive patterns

Strategy: fallback

When it happens

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

Appendix: source

Thrown at src/install/error.rs:55

    #[error("BadRequest")]
    BadRequest,
    #[error("TooManyRequests")]
    TooManyRequests,
    #[error("HTTPInternalServerError")]
    HTTPInternalServerError,
    #[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")]

View on GitHub (pinned to 8c5296ac45)