A quiet but important compatibility fix
TypeScript 7 brought a rewritten, Go-based compiler with major performance gains, and teams have been eager to adopt it. But if you tried pointing a Next.js project at TypeScript 7 over the past couple of months, you likely hit a confusing failure instead of a clean upgrade path. Next.js has now addressed this in two steps: first with a clearer error message, then with actual support. Worth walking through both, since the sequence itself is a useful lesson in how framework maintainers handle a fast-moving dependency.
The original problem
Before the fix, Next.js's build tooling misdetected TypeScript 7 as missing rather than incompatible. If a project had auto-install disabled — common in CI environments and Docker builds where you want deterministic dependency resolution — the build would fail with an error suggesting TypeScript wasn't installed at all, even though typescript@7.x was sitting right there in node_modules. That's a frustrating failure mode: the error message points you in the wrong direction, and you burn time checking your lockfile and install steps before realizing the real issue is a version mismatch the tooling didn't recognize.
Step one: a clearer error
Next.js 15.5.22 changed this by explicitly detecting TypeScript >= 7.0 and rejecting it with an actionable error, instead of silently misreporting it as missing. A rough sense of what that looks like in practice:
Error: Detected TypeScript 7.0.2, which is not yet supported by this
version of Next.js. Please downgrade to typescript@5.x, or upgrade
Next.js to a version with TypeScript 7 support.This is a small change, but it matters. An honest "not supported yet" error is something you can act on immediately. A misleading "not installed" error sends you down the wrong debugging path entirely. If your team maintains internal tooling with similar version gates, this is a good pattern to copy: when you can't support a dependency version, say so directly rather than letting a generic error surface.
Step two: real support
The fix didn't stop at a better error message. Next.js backported TypeScript 7 support into the stable 16.2 line, landing in 16.2.12. If you're running Next.js 15.5.x, note that this backport applies to the 16.2 branch — check your specific version's release notes before assuming TypeScript 7 works out of the box, since support didn't necessarily land uniformly across every maintained line at once.
Bundle this with your security patching
This compatibility fix arrived around the same time as Next.js's July 2026 security release, which patched nine vulnerabilities across the 16.2 (Active LTS, fixed in 16.2.11) and 15.5 (Maintenance LTS, fixed in 15.5.21) lines — four rated high severity, covering issues like SSRF, middleware/proxy bypass, denial of service, cache confusion, and disclosure of internal Server Function identifiers. If your team has been holding off on the security update because of TypeScript 7 friction, that friction is now largely resolved, and there's no good reason to keep deferring the patch.
A practical upgrade checklist
Before touching your TypeScript version or your Next.js version, we'd walk through this order:
- Confirm your current Next.js version and line. Run
npx next --versionand check whether you're tracking 16.2.x (Active LTS) or 15.5.x (Maintenance LTS). - Apply the security patch first, independently of the TypeScript question. Getting to 16.2.11+ or 15.5.21+ closes real vulnerabilities regardless of your TypeScript plans.
- Check whether your target version has the TypeScript 7 backport. Don't assume — read the specific patch release notes.
- Upgrade TypeScript in a separate commit from the Next.js bump. If something breaks, you want to know immediately which change caused it.
- Re-run your type-check step in CI before merging, not just your build. A project can build successfully while type errors slip through if
tsc --noEmitisn't part of the pipeline.
# quick sanity check for your current versions
npx next --version
npx tsc --versionTakeaways
This was a small fix in scope but a good example of responsible dependency-compatibility handling: acknowledge the incompatibility clearly first, then land real support once it's ready, rather than leaving developers to debug a misleading error on their own. If your project has been stuck between "we want TypeScript 7's compiler speed" and "our builds keep failing," it's worth re-checking your Next.js version today. At webhani, we handle this kind of framework and toolchain upgrade work for clients regularly — the sequencing matters as much as the individual version bumps.
References: Release v15.5.22 (GitHub), next build misdetects TypeScript 7 as missing (GitHub Issue #95490), July 2026 Security Release (Next.js Blog)