<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Turbopack &#8211; Aveshost Blog</title>
	<atom:link href="https://blog.aveshost.com/tag/turbopack/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.aveshost.com</link>
	<description>Your Blueprint for Online Success</description>
	<lastBuildDate>Wed, 18 Nov 2026 16:02:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://blog.aveshost.com/wp-content/uploads/2026/01/logo-150x150.png</url>
	<title>Turbopack &#8211; Aveshost Blog</title>
	<link>https://blog.aveshost.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Next.js 16 Upgrade Guide: Fix Breaking Changes Before Deployment</title>
		<link>https://blog.aveshost.com/next-js-16-upgrade-guide/</link>
					<comments>https://blog.aveshost.com/next-js-16-upgrade-guide/#respond</comments>
		
		<dc:creator><![CDATA[James Wilson]]></dc:creator>
		<pubDate>Wed, 18 Nov 2026 15:56:37 +0000</pubDate>
				<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Next.js]]></category>
		<category><![CDATA[Next.js 16]]></category>
		<category><![CDATA[React 19]]></category>
		<category><![CDATA[Turbopack]]></category>
		<category><![CDATA[TypeScript]]></category>
		<category><![CDATA[vps hosting]]></category>
		<guid isPermaLink="false">https://blog.aveshost.com/?p=5978</guid>

					<description><![CDATA[A practical Next.js 16 upgrade guide covering Node.js 20.9+ requirements, renaming middleware.ts to proxy.ts, awaiting dynamic request APIs, default Turbopack builds, and pre-deployment VPS checks.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This <strong>Next.js 16 upgrade guide</strong> walks through every breaking change you need to resolve before pushing your upgraded application to production. Next.js 16 brings React 19.2+, makes Turbopack the default bundler for both development and production builds, and introduces explicit <code>"use cache"</code> components—but it also removes legacy synchronous APIs and Node.js 18 support.</p>



<p class="wp-block-paragraph">Whether you deploy to Docker containers using <a href="https://blog.aveshost.com/dokploy-vs-coolify/">Dokploy or Coolify</a> or run Node.js directly behind Nginx on an <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">Aveshost Self-Managed VPS</a>, catching these breaking changes locally prevents failed CI/CD builds and runtime crashes in production.</p>



<p class="wp-block-paragraph">Below, we cover the minimum runtime requirements, the official <code>@next/codemod</code> migration command, the <code>middleware.ts</code> to <code>proxy.ts</code> rename, strictly asynchronous dynamic APIs, Turbopack compatibility, and image/AMP cleanup.</p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><div><div><a href="#nextjs-16-upgrade-guide-minimum-requirements-and-codemod">Next.js 16 Upgrade Guide: Minimum Requirements and Codemod</a></div><div><a href="#breaking-change-1-rename-middleware-ts-to-proxy-ts">Breaking Change 1: Rename middleware.ts to proxy.ts</a></div><div><a href="#breaking-change-2-await-all-async-dynamic-request-apis">Breaking Change 2: Await All Async Dynamic Request APIs</a></div><div><a href="#breaking-change-3-turbopack-default-and-custom-webpack-configs">Breaking Change 3: Turbopack Default and Custom Webpack Configs</a></div><div><a href="#breaking-change-4-next-lint-images-amp-and-use-cache">Breaking Change 4: next lint, Images, AMP, and Explicit Caching</a></div><div><a href="#pre-deployment-checklist-for-vps-and-docker-hosting">Pre-Deployment Checklist for VPS and Docker Hosting</a></div><div><a href="#faq">Frequently asked questions</a></div></div></nav></div>



<h2 id="nextjs-16-upgrade-guide-minimum-requirements-and-codemod" class="wp-block-heading">Next.js 16 Upgrade Guide: Minimum Requirements and Codemod</h2>



<p class="wp-block-paragraph">Before editing application code, verify that both your local workstation and your production VPS or Docker image meet the baseline runtime versions documented in the <a href="https://nextjs.org/docs/app/guides/upgrading/version-16" rel="noopener">official Next.js 16 upgrade documentation</a>.</p>



<p class="wp-block-paragraph">Next.js 16 officially drops support for Node.js 18. If your CI runner, Dockerfile, or Ubuntu VPS still runs Node 18, <code>next build</code> will fail immediately:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>Dependency / Tool</th><th>Next.js 15 Baseline</th><th>Next.js 16 Requirement</th></tr></thead><tbody><tr><td>Node.js Runtime</td><td>Node.js 18.18+ or 20+</td><td>Node.js 20.9.0+ (Node 18 dropped; Node 22 LTS recommended)</td></tr><tr><td>React &amp; React DOM</td><td>React 18 / 19 RC</td><td>React 19.2+ (with React Compiler support)</td></tr><tr><td>TypeScript</td><td>TypeScript 4.5.2+</td><td>TypeScript 5.1.0+</td></tr><tr><td>Default Bundler</td><td>Webpack (Turbopack opt-in for dev)</td><td>Turbopack default for both next dev and next build</td></tr><tr><td>Request Interception File</td><td>middleware.ts (middleware export)</td><td>proxy.ts (proxy export)</td></tr></tbody></table></figure>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1264" height="848" src="https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-migration-pipeline.webp" alt="Next.js 16 upgrade pipeline diagram showing Node.js 20.9+ runtime check, @next/codemod upgrade, proxy.ts and async params migration, and Turbopack VPS deployment" class="wp-image-5976" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-migration-pipeline.webp 1264w, https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-migration-pipeline-300x201.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-migration-pipeline-1024x687.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-migration-pipeline-768x515.webp 768w" sizes="(max-width: 1264px) 100vw, 1264px" /></figure>



<h2 id="breaking-change-1-rename-middleware-ts-to-proxy-ts" class="wp-block-heading">Breaking Change 1: Rename middleware.ts to proxy.ts</h2>



<p class="wp-block-paragraph">One of the most visible changes in Next.js 16 is renaming <code>middleware.ts</code> to <code>proxy.ts</code> (and renaming the exported function from <code>middleware</code> to <code>proxy</code>). The Next.js team made this change to clarify that the file acts as a network boundary and reverse-proxy layer in front of your routes rather than a traditional Express-style backend middleware.</p>



<p class="wp-block-paragraph">While <code>middleware.ts</code> still runs temporarily with a deprecation warning, migrating now keeps your codebase aligned with the official convention. Note that <code>proxy.ts</code> runs on the Node.js runtime by default.</p>



<p class="wp-block-paragraph">Run the official codemod or rename the file and exported function manually inside your project root or <code>src/</code> directory.</p>



<pre class="wp-block-code"><code># 1. Run the official Next.js 16 upgrade codemod
npx @next/codemod@canary upgrade latest

# 2. Or rename middleware.ts -&gt; proxy.ts directly
npx @next/codemod@canary middleware-to-proxy

// proxy.ts (Next.js 16)
import { NextResponse, type NextRequest } from 'next/server';

export function proxy(request: NextRequest) {
  return NextResponse.next();
}</code></pre>



<h2 id="breaking-change-2-await-all-async-dynamic-request-apis" class="wp-block-heading">Breaking Change 2: Await All Async Dynamic Request APIs</h2>



<p class="wp-block-paragraph">Next.js 15 introduced asynchronous request APIs with temporary synchronous fallbacks and console warnings. In Next.js 16, those synchronous fallbacks are <strong>completely removed</strong>.</p>



<p class="wp-block-paragraph">Every dynamic request accessor must now be awaited inside Server Components, Route Handlers (<code>route.ts</code>), Server Actions, and <code>generateMetadata</code> functions:</p>



<p class="wp-block-paragraph">• <strong>Route <code>params</code> &amp; <code>searchParams</code>:</strong> Type <code>params</code> and <code>searchParams</code> as <code>Promise&lt;{ ... }&gt;</code> in Pages, Layouts, and Route Handlers and destructure them with <code>await params</code>.</p>



<p class="wp-block-paragraph">• <strong><code>cookies()</code>, <code>headers()</code> &amp; <code>draftMode()</code>:</strong> Calling <code>cookies().get('session')</code> synchronously will throw a runtime TypeError. Always write <code>const cookieStore = await cookies();</code> first.</p>



<p class="wp-block-paragraph">• <strong>Type Generation Helper:</strong> Run <code>npx next typegen</code> after upgrading to automatically generate strict <code>PageProps</code> and <code>LayoutProps</code> types and catch missed synchronous accesses at compile time.</p>



<pre class="wp-block-code"><code>// app/posts/&#91;slug]/page.tsx (Next.js 16)
import { cookies } from 'next/headers';

export default async function PostPage({
  params,
}: {
  params: Promise&lt;{ slug: string }&gt;;
}) {
  const { slug } = await params;
  const cookieStore = await cookies();
  const theme = cookieStore.get('theme')?.value ?? 'light';

  return &lt;main data-theme={theme}&gt;Post: {slug}&lt;/main&gt;;
}</code></pre>



<h2 id="breaking-change-3-turbopack-default-and-custom-webpack-configs" class="wp-block-heading">Breaking Change 3: Turbopack Default and Custom Webpack Configs</h2>



<p class="wp-block-paragraph">Turbopack is now the default bundler for both <code>next dev</code> and <code>next build</code>, delivering dramatically faster Fast Refresh and production builds. However, if your <code>next.config.ts</code> contains a custom <code>webpack(config) { ... }</code> function (for example, SVGR loaders, custom aliases, or raw-loader rules), Turbopack will fail or warn unless you migrate those rules or opt back into Webpack.</p>



<p class="wp-block-paragraph">• <strong>Migrate Loaders to <code>turbopack</code> Config:</strong> Move supported Webpack loaders and resolve aliases into the top-level <code>turbopack</code> block in <code>next.config.ts</code>.</p>



<p class="wp-block-paragraph">• <strong>Temporary Webpack Escape Hatch:</strong> If a third-party plugin relies on an unsupported Webpack plugin and you need to ship urgently, update your <code>package.json</code> build script to <code>next build --webpack</code> until you complete the Turbopack migration.</p>



<h2 id="breaking-change-4-next-lint-images-amp-and-use-cache" class="wp-block-heading">Breaking Change 4: next lint, Images, AMP, and Explicit Caching</h2>



<p class="wp-block-paragraph">Several long-standing CLI commands, image props, and experimental caching flags also changed in Next.js 16:</p>



<p class="wp-block-paragraph">• <strong><code>next lint</code> Removed:</strong> The built-in <code>next lint</code> wrapper has been removed. Update your <code>package.json</code> lint script to invoke ESLint directly (<code>eslint .</code>) or use Biome.</p>



<p class="wp-block-paragraph">• <strong><code>images.domains</code> Removed &amp; <code>next/legacy/image</code> Deprecated:</strong> Replace legacy <code>images.domains</code> arrays in <code>next.config.ts</code> with <code>images.remotePatterns</code>, migrate any remaining <code>next/legacy/image</code> imports to <code>next/image</code>, and note that <code>preload</code> supersedes <code>priority</code> while default image cache TTL increased from 60 seconds to 4 hours.</p>



<p class="wp-block-paragraph">• <strong>AMP Support Removed:</strong> Built-in Accelerated Mobile Pages (AMP) rendering and <code>useAmp</code> have been completely removed from the framework.</p>



<p class="wp-block-paragraph">• <strong>Explicit <code>cacheComponents</code> &amp; <code>"use cache"</code>:</strong> Experimental Partial Prerendering (<code>experimental.ppr</code>) is replaced by <code>cacheComponents: true</code>, shifting Next.js to an explicit opt-in caching model using the <code>"use cache"</code> directive.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1264" height="848" src="https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-breaking-changes-grid.webp" alt="6 Next.js 16 breaking changes to fix before deployment covering proxy.ts, async dynamic APIs, Turbopack default, Node.js 20.9+, image/AMP cleanup, and ESLint/use cache" class="wp-image-5977" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-breaking-changes-grid.webp 1264w, https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-breaking-changes-grid-300x201.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-breaking-changes-grid-1024x687.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/nextjs-16-breaking-changes-grid-768x515.webp 768w" sizes="(max-width: 1264px) 100vw, 1264px" /></figure>



<h2 id="pre-deployment-checklist-for-vps-and-docker-hosting" class="wp-block-heading">Pre-Deployment Checklist for VPS and Docker Hosting</h2>



<p class="wp-block-paragraph">Once your local <code>npm run build</code> passes cleanly with zero TypeScript or Turbopack errors, verify your deployment target before pushing to production:</p>



<p class="wp-block-paragraph">• <strong>Update Your VPS or Dockerfile Node Version:</strong> On an <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">Aveshost Ubuntu VPS</a>, check <code>node -v</code> and upgrade to Node.js 22 LTS if you are still on Node 18. In Dockerfiles, update your base image to <code>FROM node:22-alpine</code>.</p>



<p class="wp-block-paragraph">• <strong>Keep <code>output: 'standalone'</code> for Lean Containers:</strong> If you deploy via <a href="https://blog.aveshost.com/dokploy-vs-coolify/">Dokploy, Coolify</a>, or Docker Compose, <code>output: 'standalone'</code> trims production container size dramatically and starts in under a second.</p>



<p class="wp-block-paragraph">• <strong>Test Dynamic Routes &amp; Edge Headers Live:</strong> After deploying, verify that your renamed <code>proxy.ts</code> redirects, auth cookies, and dynamic <code>[slug]</code> routes return <code>200 OK</code> with no unhandled Promise rejections in server logs.</p>



<h2 id="faq" class="wp-block-heading">Frequently asked questions</h2>


<div id="rank-math-faq" class="rank-math-block">
<div class="rank-math-list ">
<div id="faq-question-7fb04c8174e244c094053b165da4b4ef" class="rank-math-list-item">
<h3 class="rank-math-question ">What is the minimum Node.js version required for Next.js 16?</h3>
<div class="rank-math-answer ">

<p>Next.js 16 requires Node.js 20.9.0 or higher (with Node.js 22 LTS recommended for production). Support for Node.js 18 has been completely dropped, so you must update your local environment, CI/CD runners, and VPS/Dockerfile Node runtime before running next build.</p>

</div>
</div>
<div id="faq-question-c4c1b704e870435289b036b99c430833" class="rank-math-list-item">
<h3 class="rank-math-question ">Do I have to rename middleware.ts to proxy.ts in Next.js 16?</h3>
<div class="rank-math-answer ">

<p>In Next.js 16, middleware.ts is deprecated in favor of proxy.ts (exporting function proxy(request: NextRequest)) to reflect its role as a network boundary. While middleware.ts still works temporarily with a deprecation warning, you should run npx @next/codemod@canary middleware-to-proxy to migrate cleanly before the next major release.</p>

</div>
</div>
<div id="faq-question-f5b1566039cd4916a79144cf1f74f909" class="rank-math-list-item">
<h3 class="rank-math-question ">How do I fix &#8216;params should be awaited before using its properties&#8217; in Next.js 16?</h3>
<div class="rank-math-answer ">

<p>Update your Page, Layout, and Route Handler components to async functions, type params and searchParams as Promise, and await them (const { id } = await params). The same strict async requirement applies to cookies(), headers(), and draftMode().</p>

</div>
</div>
<div id="faq-question-2aa1aa02c4eb4164ac15984395bc2be4" class="rank-math-list-item">
<h3 class="rank-math-question ">My custom webpack config broke in Next.js 16—how can I deploy quickly?</h3>
<div class="rank-math-answer ">

<p>Next.js 16 uses Turbopack by default for both next dev and next build, which skips custom webpack() functions in next.config.ts. You can either migrate your loaders into the turbopack configuration key or temporarily force Webpack by changing your build script to next build &#8211;webpack.</p>

</div>
</div>
<div id="faq-question-70e10bb1757c47cc911aa591cb600656" class="rank-math-list-item">
<h3 class="rank-math-question ">How do I automatically upgrade a Next.js 15 project to Next.js 16?</h3>
<div class="rank-math-answer ">

<p>Run npx @next/codemod@canary upgrade latest in your project root. The official Next.js codemod upgrades next, react, and react-dom, applies breaking-change transforms (such as async dynamic APIs and config updates), and flags any remaining manual fixes before you run npm run build.</p>

</div>
</div>
</div>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://blog.aveshost.com/next-js-16-upgrade-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
