Next.js: Page does not match the required types of a Next.js Page
The validator needs Promise params and exact keys. Make pages async, await searchParams, and let PageProps from next typegen replace your own prop types.

Introduction & Quick Summary
next build stops with a type error that names the file, not a line of your code:
Type error: Page "src/app/blog/[slug]/page.tsx" does not match the
required types of a Next.js Page.
"props" is an invalid Page type.The message means Next.js validated your default export against the shape it will call at runtime, and your signature disagrees. In the App Router the validator is strict: extra props, optional params, and a synchronous params object in Next.js 15 and later all fail it.
Quick answer for Next.js 15 and 16, where params is a Promise:
export default async function Page({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
return <article>{slug}</article>;
}Next.js 16 also ships generated route types. PageProps<"/blog/[slug]"> is available after next typegen (or any next dev/next build run) and keeps the signature in sync with the folder name, which removes the hand-written prop type entirely.
The usual triggers, in order of frequency:
- A page copied from a Next.js 13 or 14 codebase with
params: { slug: string }. props: { params?: ...; searchParams?: ... }with both optional, added to silence an earlier error.- A
layout.tsxthat declares its ownchildrentype and forgetsparams. - A stale
.next/typesdirectory after renaming a dynamic segment. - A page that exports extra named fields the validator does not recognise.
Core Mechanics, Signatures & Reproducible Setup
The App Router generates a type-check file per route during the build. It declares the expected props for that path and asserts that your default export is assignable to it. The check runs before compilation of the pages themselves, which is why the error text talks about the file and not a specific expression.
What each route file receives:
// app/blog/[slug]/page.tsx
type PageProps = {
params: Promise<{ slug: string }>; // dynamic segments
searchParams: Promise<Record<string, string | string[] | undefined>>;
};
// app/blog/[slug]/layout.tsx
type LayoutProps = {
children: React.ReactNode;
params: Promise<{ slug: string }>;
};
// app/api/items/[id]/route.ts — route handlers use a context argument
export async function GET(
request: Request,
ctx: { params: Promise<{ id: string }> },
) {
const { id } = await ctx.params;
return Response.json({ id });
}Reproduce the failure without any application code:
npx create-next-app@latest typeerr --ts --app --no-tailwind --no-eslint --no-src-dir
cd typeerr
mkdir -p app/blog/\[slug\]
cat > app/blog/\[slug\]/page.tsx <<'EOF'
export default function Page({ params }: { params: { slug: string } }) {
return <div>{params.slug}</div>;
}
EOF
npx next buildThe build fails on exactly the message above. Change the type to Promise<{ slug: string }>, make the function async, add const { slug } = await params, and the same page compiles.
Two details matter when you fix it by hand. First, params and searchParams are always Promises in Next.js 15+, so a page that never awaits them still needs async if it reads them. Second, children belongs to layouts only; a page that declares children fails the same validator with a different invalid field name.
Key Comparison Table
The signature changed across majors. Copying from the wrong column is the whole bug:
| Next.js | params type | Must await | Notes |
|---|---|---|---|
| 13.4 – 14.x | { slug: string } | no | synchronous props |
| 15.0 – 15.4 | Promise<{ slug: string }> | yes | sync access logs a deprecation warning |
| 15.5+ | Promise<{ slug: string }> | yes | PageProps<"/route"> helper available |
| 16.x | Promise<{ slug: string }> | yes | sync access throws; typegen is on by default |
Which file gets which props:
| File | Receives | Common mistake |
|---|---|---|
page.tsx | params, searchParams | adding children |
layout.tsx | children, params | omitting children |
template.tsx | children | declaring params for a non-dynamic route |
route.ts | request plus context with params | treating the context as props |
generateMetadata | same props as the page | leaving it synchronous |
Reading the validator output instead of guessing:
| Message fragment | Real cause | Fix |
|---|---|---|
"props" is an invalid Page type | prop object does not match | use Promise params and exact keys |
"default" is an invalid Page type | not a component, or returns void | return JSX; export default |
Page "..." does not match after a rename | stale generated types | delete .next and rebuild |
Type 'Promise<...>' is not assignable to type '{...}' | page still awaits nothing but types are new | make it async and await |
Practical Edge Cases, Error Fixes & Deep Dive Code Examples
1. The synchronous page from an old tutorial
// fails on Next.js 15 and later
export default function Page({ params }: { params: { slug: string } }) {
return <h1>{params.slug}</h1>;
}
// fixed
export default async function Page({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
return <h1>{slug}</h1>;
}If the page only needs the segment for a metadata call, keep it async anyway; generateMetadata receives the same Promise and both must await.
2. searchParams is a Promise too, and it is per-request
export default async function Page({
searchParams,
}: {
searchParams: Promise<{ q?: string; page?: string }>;
}) {
const { q, page } = await searchParams;
const current = Number(page ?? 1);
return <Results query={q ?? ""} page={current} />;
}Typing searchParams as Record<string, string> compiles in isolation and fails the validator, because repeated query keys produce string[] and the framework will not narrow that for you.
3. Optional props break the check
Adding ? to quiet a conditional is a common reflex and the validator rejects it, because the framework always passes both objects:
// rejected
{ params?: { slug: string } }
// correct for a non-dynamic route: omit params entirely
export default function About() { return <p>About</p>; }A static route receives no params key at all, so declaring one — required or optional — is the error.
4. generateMetadata must match the page
export async function generateMetadata({
params,
}: {
params: Promise<{ slug: string }>;
}): Promise<Metadata> {
const { slug } = await params;
return { title: slug };
}A generateMetadata typed with the old synchronous shape produces the same "does not match" text, sometimes attributed to the page because the validator reports per file. Both signatures are checked together.
5. Use the generated types instead of writing them
// Next.js 15.5+, after next typegen has run once
export default async function Page({ params }: PageProps<"/blog/[slug]">) {
const { slug } = await params;
return <article>{slug}</article>;
}PageProps is global, generated from next-env.d.ts, and updates when the folder is renamed. In CI, run npx next typegen before tsc --noEmit so the type exists on a clean checkout; a workflow that only runs tsc sees Cannot find name 'PageProps'.
6. Stale generated types after moving routes
Renaming [id] to [slug] leaves old declarations in .next/types until the next build regenerates them, and editors then report two conflicting shapes. The reliable reset:
rm -rf .next node_modules/.cache
npx next typegen && npx next buildOn Vercel the build cache can preserve the same staleness; adding .next to the cache-excluded paths, or bumping a cache-key suffix, clears it once.
Common Compilation/Runtime Mistakes & Version Gotchas
Fixed with as any. Casting the props object hides the error and the page then reads params.slug from a Promise, printing undefined in production. The type error is the only warning you get.
Mixed @types/react copies. A pnpm workspace that hoists two React 19 type packages produces "does not match" errors on pages that are perfectly typed, because the validator compares against its own React types. pnpm why @types/react should show one version.
skipLibCheck: true does not skip this check. The generated file is not a library declaration, and the validation runs regardless of that flag, which is why turning it on never fixed the build.
Next.js 14 to 15 upgrade. Pages keep compiling under 15.0 because synchronous access only logs a deprecation warning, then break on 16 where it throws params should be awaited. Migrate the signatures during the upgrade rather than after.
typedRoutes history. Experimental in 15.0, stable in 15.5, and default in 16. A project that never enabled it has no PageProps helper, only the hand-written Promise types, so a copied snippet fails with Cannot find name 'PageProps'.
Checking the rendered result. After the build passes, confirm the route actually renders with the segment value rather than an empty string; the JSON formatter is handy for comparing a searchParams payload against what the page expects, and status code reference helps distinguish a 404 from a validator failure when testing with curl.
Reference material: page.js file convention and TypeScript configuration in Next.js.
Official references
primary documentationThe Next.js documentation that defines the behaviour this guide explains.
Try matching browser tools
All toolsSmall utilities that fit Next.js work — they run entirely in this browser tab, so nothing you paste leaves your device.
Related Next.js guides
All Next.js guidesModule not found: Can't resolve a package or alias in Next.js
TypeScript and the bundler resolve imports separately. Align path aliases, workspace dependencies, exports conditions and filename case.
Next.js 16 DynamicServerError: cookies(), headers() and fetchCache
Request-time APIs make a route dynamic, and Next 16 replaced the segment configs with Suspense boundaries and use cache. What to delete and what to wrap.
Next.js cacheComponents: 'used uncached or runtime data' build error
Cache Components makes the build refuse to guess where the static shell ends. Stream it, cache it with use cache, or declare the route blocking.
next/font: Failed to fetch a Google font during the build
The font is fetched during the build, not at runtime. Vendor it with next/font/local or give CI and Docker a route out.
More in Next.js
All Next.js guidesThe guides filed next to this one in Next.js, in library order.