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

PackageFailedToParse

Error message

PackageFailedToParse

What it means

Sentinel variant of the install Error enum: a registry payload (package metadata or manifest JSON) failed to parse into the expected structure. The downloaded data was not valid for the schema the installer expects; parse details are reported at the throw site.

Solutions

  1. Verify the package publishes a valid package.json to the registry
  2. Clear the manifest cache and retry
  3. Check for lockfile corruption — delete and regenerate bun.lock
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

Thrown at src/install/error.rs:45

    #[error("TarballHTTP404")]
    TarballHTTP404,
    #[error("TarballHTTP4xx")]
    TarballHTTP4xx,
    #[error("TarballHTTP5xx")]
    TarballHTTP5xx,
    #[error("TarballFailedToExtract")]
    TarballFailedToExtract,
    #[error("TarballFailedToDownload")]
    TarballFailedToDownload,
    #[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")]

View on GitHub (pinned to 8c5296ac45)