Skip to content

Commit d89f736

Browse files
staticoclaude
andcommitted
Fix build under typescript@7 via useTypeScriptCli
typescript@7 is the native Go port and no longer exposes the JS compiler API that Next's built-in type checker calls into, so `next build` failed with "TypeScript 7.0.2 does not provide the compiler API required by Next.js". Setting experimental.useTypeScriptCli makes Next shell out to the tsc binary instead. Note that typescript.ignoreBuildErrors is not a workaround here -- the build still fails after printing "Skipping validation of types". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 13c0451 commit d89f736

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

next.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
44
staticPageGenerationTimeout: 300,
5+
// typescript@7 is the native port and no longer exposes the JS compiler
6+
// API that Next's built-in type checker uses, so shell out to tsc instead.
7+
experimental: { useTypeScriptCli: true },
58
};
69

710
export default nextConfig;

0 commit comments

Comments
 (0)