{"record":{"id":"b41ac722ef0eed4c","repo":"oven-sh/bun","slug":"invalidjson","errorCode":"InvalidJSON","errorMessage":"InvalidJSON","messagePattern":"InvalidJSON","errorType":"error_code","errorClass":"bun_bundler::Error","httpStatus":null,"severity":"error","filePath":"src/bundler/error.rs","lineNumber":23,"sourceCode":"    #[error(\"ModuleNotFound\")]\n    ModuleNotFound,\n    #[error(\"BuildFailed\")]\n    BuildFailed,\n    #[error(\"CompilationFailed\")]\n    CompilationFailed,\n    #[error(\"Plugin\")]\n    Plugin,\n    #[error(\"InvalidCssImport\")]\n    InvalidCssImport,\n    #[error(\"PrintError\")]\n    PrintError,\n    #[error(\"WriteFailed\")]\n    WriteFailed,\n    #[error(\"DuplicateOutputPath\")]\n    DuplicateOutputPath,\n    #[error(\"MultipleOutputFilesWithoutOutputDir\")]\n    MultipleOutputFilesWithoutOutputDir,\n    #[error(\"InvalidJSON\")]\n    InvalidJSON,\n    #[error(\"Fail\")]\n    Fail,\n    #[error(\"ParserError\")]\n    ParserError,\n    #[error(\"SyntaxError\")]\n    SyntaxError,\n    #[error(\"MinifyError\")]\n    MinifyError,\n    #[error(\"InvalidNativePlugin\")]\n    InvalidNativePlugin,\n    #[error(\"EmptyAST\")]\n    EmptyAST,\n    #[error(\"FormatError\")]\n    FormatError,\n    #[error(\"ResolveMessage\")]\n    ResolveMessage,\n    #[error(\"JSError\")]","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/bundler/error.rs#L5-L41","documentation":"Sentinel variant of the bundler Error enum: a JSON input the bundler needed to parse (e.g. package.json, tsconfig, or an imported .json module in some paths) is not valid JSON. The parse error details live at the throw site; the variant itself is just the machine-readable name.","triggerScenarios":"Thrown at src/bundler/error.rs:23 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the JSON syntax at the reported position (trailing commas, comments in strict JSON, etc.)","Validate the file with a JSON parser","Rename to .jsonc if comments were intended and the loader supports it"],"exampleFix":null,"handlingStrategy":"validation","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"}