{"record":{"id":"132e1ac2b3418d5b","repo":"vercel/next.js","slug":"could-not-parse-tsconfig-json-please-make-sure-it","errorCode":null,"errorMessage":"Could not parse tsconfig.json. Please make sure it contains syntactically correct JSON.\n${err.message}","messagePattern":"Could not parse tsconfig\\.json\\. Please make sure it contains syntactically correct JSON\\.\n(.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/lib/typescript/getTypeScriptConfiguration.ts","lineNumber":63,"sourceCode":"      result.errors = result.errors.filter(\n        ({ code }) =>\n          // No inputs were found in config file\n          code !== 18003\n      )\n    }\n\n    if (result.errors?.length) {\n      // TODO: Throw AggregateError for all diagnostics.\n      throw new Error(\n        typescript.formatDiagnostic(result.errors[0], formatDiagnosticsHost)\n      )\n    }\n\n    return result\n  } catch (err) {\n    if (isError(err) && err.name === 'SyntaxError') {\n      const reason = '\\n' + (err.message ?? '')\n      throw new Error(\n        bold(\n          'Could not parse' +\n            cyan('tsconfig.json') +\n            '.' +\n            ' Please make sure it contains syntactically correct JSON.'\n        ) + reason\n      )\n    }\n    throw err\n  }\n}\n","sourceCodeStart":45,"sourceCodeEnd":75,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/lib/typescript/getTypeScriptConfiguration.ts#L45-L75","documentation":"tsconfig.json could not even be parsed: the TypeScript config file contains syntactically invalid JSON, and the SyntaxError from parsing is wrapped with the original message appended. This is a file-correction task on the user's tsconfig, distinct from semantic TS diagnostics reported separately.","triggerScenarios":"tsconfig.json contains invalid JSON syntax.","commonSituations":"Trailing commas, comments, or syntax errors make tsconfig.json unparsable at startup.","solutions":["Fix the JSON syntax error in tsconfig.json (trailing commas, comments are allowed but must be valid JSONC)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}