Next.js 15 in Production: The Migration Problems Tutorials Skip

The upgrade guide makes Next.js 15 sound like a version bump with a codemod. On a toy app it is. On a production App Router project with a few hundred routes, a design system and thirty third-party packages, it took us weeks. Most of that time went into things no tutorial mentions.

These are the problems we actually hit, roughly in the order we hit them.

1. Request APIs became async

The biggest code change: cookies(), headers() and draftMode() now return Promises, and so do params and searchParams in pages, layouts, route handlers and generateMetadata.

// Next.js 14
export default function Page({ params }: { params: { slug: string } }) {
  const theme = cookies().get("theme");
  return <Post slug={params.slug} />;
}

// Next.js 15
export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
  const { slug } = await params;
  const theme = (await cookies()).get("theme");
  return <Post slug={slug} />;
}

The codemod (npx @next/codemod@canary upgrade latest) handles the easy cases. It cannot fix helpers that receive params and pass them three functions deep, or client components that read params as a prop. In client components, use React's use(params) or the useParams() hook.

The sync access still works with a warning during the transition. Do not ship with the warnings: search the logs for them and fix each one, because the compatibility layer will go away.

2. Caching defaults flipped, and costs moved

Next.js 14 cached aggressively by default. Next.js 15 does not:

What Next.js 14 default Next.js 15 default
fetch() in server components Cached (force-cache) Not cached
GET route handlers Static when possible Dynamic
Client router cache for page segments Reused for 30 s Refetched on navigation

Nothing breaks visibly. What changes is that pages which used to be served from cache now hit your backend on every request. Our API traffic from the frontend went up sharply the day we deployed to staging. The fix is to be explicit everywhere: fetch(url, { cache: "force-cache", next: { revalidate: 300 } }), export const dynamic = "force-static" on route handlers that should be static, and staleTimes in the config if you relied on the old client cache.

Lesson: load-test the upgraded build against a staging backend and compare request counts, not just page timings.

3. React 19 came along for the ride

The App Router in Next.js 15 requires React 19. That brought its own changes:

  • useFormState is now useActionState.
  • ref is a normal prop, and forwardRef is on its way out. Some of our wrapper components passed refs in odd ways and broke.
  • Several old APIs were removed, including string refs and propTypes checks on function components.

The real pain was third-party packages. Animation libraries, rich-text editors and older component kits declared react@^18 as a peer dependency. npm refused to install, and the tempting fix is --legacy-peer-deps. Do it only after checking each package: some genuinely work on 19, others fail at runtime in ways the installer cannot show you. We replaced two packages and pinned a release candidate of a third.

4. Hydration errors got louder

React 19 reports hydration mismatches more clearly, with a diff. That is good, but it surfaced dozens of old bugs at once:

  • new Date() or Math.random() rendered on the server and again on the client.
  • Locale-dependent formatting (toLocaleString) with different server and browser locales.
  • Browser extensions injecting attributes into <html> or <body>. That is not your bug, but it shows up in your error tracker.
  • Invalid nesting, like a <div> inside a <p>, that browsers silently repaired.

We fixed the real ones by formatting dates on the client or passing preformatted strings, and filtered the extension noise in the error tracker.

5. Config renames and build differences

Smaller items that each cost an afternoon:

  • experimental.serverComponentsExternalPackages became serverExternalPackages, and bundlePagesExternals became bundlePagesRouterDependencies.
  • @next/font is gone; use next/font.
  • next lint gained ESLint 9 support, which moved us to the flat config format.
  • next dev --turbo is stable in 15 and much faster, but one Webpack-specific loader in our config had no Turbopack equivalent. We kept Webpack for production builds and used Turbopack only in development.
  • Self-hosted standalone builds now use sharp automatically for image optimization. Our Docker image needed the right platform build of it.

How we rolled it out

What worked for us:

  1. Upgrade in a branch, deploy to staging, and run it for a week with real traffic replayed against it.
  2. Fix warnings before features. Treat every sync-API and hydration warning as a bug.
  3. Compare backend request counts and cache hit rates, not only Lighthouse scores.
  4. Canary in production. Send 5% of traffic to the new build and watch errors, latency and backend load before going to 100%.
  5. Keep the old build deployable for a couple of weeks. We needed it once.

Next.js 15 is a better framework: explicit caching is easier to reason about than the old magic, and Turbopack makes development much faster. But "better" is not "free". Budget for the dependency audit and the caching review, and the codemod becomes the easy 20% it really is.