latentstack
Blog
Tech stackBy Suraj5 min read

Next.js 15 is out of support: how to upgrade to Next.js 16 safely (step by step)

Next.js 15 stopped receiving security fixes on October 21, 2026. What end of support means, the Next.js 16 breaking changes that actually bite, a step-by-step upgrade with the official codemod, and a checklist to ship it without surprises.

Next.js 15 is out of support: how to upgrade to Next.js 16 safely (step by step)

Quick answer: Next.js 15's maintenance support ended on October 21, 2026, so it no longer receives scheduled security fixes. Upgrade to Next.js 16 (16.4 is current) with the official codemod: npx @next/codemod@canary upgrade latest. Then fix the handful of breaking changes: async request APIs, middleware renamed to proxy, Turbopack by default and next lint removed.

This site runs on Next.js 16.4 with Cache Components enabled, so everything below comes from a real upgrade, not just the release notes.

What "end of support" means

Next.js gives each major version two years of maintenance from its first release. Next.js 15 shipped on October 21, 2024, so its support ended on October 21, 2026.

After that date:

  • No scheduled security patches for 15.x. New vulnerabilities are expected to be fixed in 16.x only.
  • Your app keeps working: nothing breaks on the day support ends.
  • The risk grows over time, as new issues are found and only fixed in newer versions.

The Next.js team has occasionally patched unsupported versions for severe issues, but that's an exception, not a plan.

Before you start

  1. Check your versions: npx next --version and your Node.js version (node -v). Next.js 16 needs Node.js 20.9 or newer.
  2. Commit everything so you can review the codemod's changes as one diff.
  3. Make sure tests and a production build pass on 15 first, so new failures are clearly caused by the upgrade.
  4. Note your deployment platform, because some build settings change (see Turbopack below).

Step 1: run the official upgrade codemod

npx @next/codemod@canary upgrade latest

The codemod updates next, react and react-dom, and applies automatic fixes for most breaking changes. Review the diff carefully. It's a starting point, not the finish line.

Step 2: fix the breaking changes that matter

Request APIs are async only

In Next.js 15, cookies(), headers(), draftMode(), params and searchParams became async but still allowed synchronous access with a warning. In 16, synchronous access is removed.

Before (Next.js 15 tolerated this)
export default function Page({ params }) {
  const { slug } = params;
}
After (Next.js 16)
export default async function Page({ params }: PageProps<"/blog/[slug]">) {
  const { slug } = await params;
}

Run npx next typegen to generate the PageProps, LayoutProps and RouteContext helper types for your routes.

middleware.ts becomes proxy.ts

The middleware file convention is renamed proxy to make clear it runs at the network boundary. Rename the file and the exported function:

proxy.ts
import { NextResponse, type NextRequest } from "next/server";
 
export function proxy(request: NextRequest) {
  return NextResponse.next();
}

Turbopack is the default

Turbopack is now the default bundler for both next dev and next build. Most apps just get faster builds. If you have a custom webpack config, either migrate it to Turbopack options or opt out with next build --webpack while you migrate.

next lint is removed

Run ESLint (or Biome) directly. A typical script:

package.json
{
  "scripts": {
    "lint": "eslint ."
  }
}

Caching changes

  • experimental.ppr and the old dynamic IO flags are replaced by Cache Components: set cacheComponents: true in next.config.ts and use the "use cache" directive.
  • revalidateTag() takes a cache-life profile as its second argument (for example revalidateTag("posts", "max")).

You don't have to adopt Cache Components on day one, but it's where Next.js is heading, and the 16.4 release recommends it for every app.

Other changes worth checking

  • Images: some next/image defaults changed (such as the minimum cache TTL and default quality settings). Check pages with many images.
  • Parallel routes need an explicit default.js file.
  • AMP support is removed.

Step 3: build, test and check performance

npm run build
npm run start

Then test the paths that use cookies, headers, redirects, auth and caching most heavily. Compare build time and page performance with your 15.x baseline. Most apps should see faster builds thanks to Turbopack.

Step 4: deploy gradually

  • Deploy to a preview environment first and run your end-to-end tests.
  • Watch error tracking and logs closely for the first day after release.
  • Keep the old deployment available for a quick rollback.

Can't upgrade yet?

If a big migration isn't possible right now:

  • Stay on the latest 15.x patch and watch security advisories closely.
  • Put a WAF in front of the app and keep dependencies updated.
  • Consider an extended-support vendor if you're in a regulated environment.
  • Schedule the upgrade. The risk only grows over time.

Upgrade checklist

  • Node.js 20.9+
  • Ran npx @next/codemod@canary upgrade latest
  • All request APIs awaited (params, searchParams, cookies(), headers())
  • middleware.ts renamed to proxy.ts
  • Custom webpack config migrated or --webpack used temporarily
  • Lint script uses ESLint/Biome directly
  • Caching flags updated
  • Production build and E2E tests pass
  • Preview deploy checked before production

Once you're on 16, see what's new in Next.js 16.4 for the features worth adopting.

Frequently asked questions

When does Next.js 15 support end?

Next.js 15 maintenance support ended on October 21, 2026, two years after its October 21, 2024 release. It no longer receives scheduled security fixes; new fixes are expected in Next.js 16.

Will my Next.js 15 app stop working?

No. Your app keeps running after end of support. The risk is that newly discovered vulnerabilities won't be patched in 15.x, so the app becomes less secure over time.

How do I upgrade from Next.js 15 to 16?

Make sure you're on Node.js 20.9 or newer, run npx @next/codemod@canary upgrade latest, review the changes, fix remaining breaking changes such as async request APIs and the middleware-to-proxy rename, then build, test and deploy to a preview first.

What are the biggest breaking changes in Next.js 16?

Synchronous access to params, searchParams, cookies() and headers() is removed, middleware.ts is renamed to proxy.ts, Turbopack is the default bundler, next lint is removed, and caching flags are replaced by Cache Components.

Does Next.js 16 require a newer Node.js version?

Yes. Next.js 16 requires Node.js 20.9 or newer.

Can I keep using webpack in Next.js 16?

Yes, temporarily. Turbopack is the default, but you can opt out with next build --webpack while you migrate a custom webpack configuration.

Sources

Found this useful?

Leave a like, share it with someone who's building with AI, or tell me what you think below.

Comments

Comments

Comments are public. Be kind. See the privacy policy.

    Get the next noteComing soon

    One short email when a new post lands. No spam.