{"record":{"id":"fc524f3d95301966","repo":"oven-sh/bun","slug":"invalidpackagejson","errorCode":null,"errorMessage":"InvalidPackageJSON","messagePattern":"InvalidPackageJSON","errorType":"error_code","errorClass":"bun_install::Error","httpStatus":null,"severity":"error","filePath":"src/install/error.rs","lineNumber":53,"sourceCode":"    #[error(\"TarballFailedToDownload\")]\n    TarballFailedToDownload,\n    #[error(\"BadRequest\")]\n    BadRequest,\n    #[error(\"TooManyRequests\")]\n    TooManyRequests,\n    #[error(\"HTTPInternalServerError\")]\n    HTTPInternalServerError,\n    #[error(\"UnexpectedNotModified\")]\n    UnexpectedNotModified,\n    #[error(\"PackageFailedToParse\")]\n    PackageFailedToParse,\n    #[error(\"BufferTooSmall\")]\n    BufferTooSmall,\n    #[error(\"DanglingSymlink\")]\n    DanglingSymlink,\n    #[error(\"UnsupportedYarnLockfileVersion\")]\n    UnsupportedYarnLockfileVersion,\n    #[error(\"InvalidPackageJSON\")]\n    InvalidPackageJSON,\n    #[error(\"LockfileResolveFailed\")]\n    LockfileResolveFailed,\n    #[error(\"DistTagNotFound\")]\n    DistTagNotFound,\n    #[error(\"NoMatchingVersion\")]\n    NoMatchingVersion,\n    #[error(\"TooRecentVersion\")]\n    TooRecentVersion,\n    #[error(\"MissingPackageJSON\")]\n    MissingPackageJSON,\n    #[error(\"InstallFailed\")]\n    InstallFailed,\n    #[error(\"HTTPError\")]\n    HTTPError,\n    #[error(\"Failed\")]\n    Failed,\n    #[error(\"UnrecognizedDependencyFormat\")]","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/install/error.rs#L35-L71","documentation":"A dependency's package.json could not be parsed as valid JSON (or was missing required fields) while resolving during install. It fires when the package manifest fetched from the registry or read from disk is malformed, so the resolver cannot extract name/version/dependencies.","triggerScenarios":"Thrown at src/install/error.rs:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the failing package's package.json is valid JSON (run it through a JSON validator)","If the error is from a registry tarball, clear the cached package and re-fetch it","Pin the dependency to a known-good published version in package.json"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}