{"record":{"id":"d24dd4aa11be93e1","repo":"vercel/next.js","slug":"minimum-recommended-typescript-version-is-v5-1-0","errorCode":null,"errorMessage":"Minimum recommended TypeScript version is v5.1.0, older versions can potentially be incompatible with Next.js. Detected: ${typescriptVersion}","messagePattern":"Minimum recommended TypeScript version is v5\\.1\\.0, older versions can potentially be incompatible with Next\\.js\\. Detected: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/lib/verify-typescript-setup.ts","lineNumber":226,"sourceCode":"\n    const typeScriptPackage = getTypeScriptPackageInfo(dir)\n    const typeScriptPath = useTypeScriptCli\n      ? typeScriptPackage?.tscPath\n      : typeScriptPackage?.apiPath\n\n    if (!typeScriptPackage || !typeScriptPath) {\n      missingDepsError(\n        dir,\n        deps.missing.length > 0\n          ? deps.missing\n          : [useTypeScriptCli ? typescriptCliPackage : typescriptApiPackage]\n      )\n    }\n\n    const typescriptVersion = typeScriptPackage.version\n\n    if (semver.lt(typescriptVersion, '5.1.0')) {\n      log.warn(\n        `Minimum recommended TypeScript version is v5.1.0, older versions can potentially be incompatible with Next.js. Detected: ${typescriptVersion}`\n      )\n    }\n\n    // Reconfigure (or create) the user's `tsconfig.json` for them:\n    await writeConfigurationDefaults(\n      typescriptVersion,\n      resolvedTsConfigPath,\n      intent.firstTimeSetup,\n      hasAppDir,\n      distDir,\n      hasPagesDir,\n      strictRouteTypes\n    )\n    // Write out the necessary `next-env.d.ts` file to correctly register\n    // Next.js' types:\n    await writeAppTypeDeclarations({\n      baseDir: dir,","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/vercel/next.js/blob/89d017eac43ebf4742ed2b58d3c1373b70283b69/packages/next/src/lib/verify-typescript-setup.ts#L208-L244","documentation":"Non-fatal warning from verifyAndRunTypeScript during next typegen / build: the locally detected TypeScript package version was compared with semver.lt against the 5.1.0 minimum. Older compilers can emit declarations incompatible with Next.js' generated types, so the check warns (but proceeds) naming the detected version.","triggerScenarios":"Thrown at packages/next/src/lib/verify-typescript-setup.ts:224 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Upgrade TypeScript to v5.1.0 or newer: `npm install --save-dev typescript@latest`."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89d017eac43ebf4742ed2b58d3c1373b70283b69","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}