Next.js · silent bug
params.slug is undefined (params is a Promise)
Property 'slug' does not exist on type 'Promise<{ slug: string; }>'. · page renders "undefined"What it means
Since Next.js 15, params and searchParams are Promises. Code from older tutorials reads params.slug directly. In our Next.js 16.4.3 test build that didn't fail at all: the page just rendered "undefined".
Common causes
- The page is typed { params: { slug: string } } (the old shape), so TypeScript doesn't catch it
- Agents trained on Next.js 13/14 examples
- Same for searchParams, cookies() and headers(): all async now
How to fix it
- Type params as a Promise and await it in Server Components
- In a Client Component, unwrap it with React's use(params)
- Search the codebase for params. and searchParams. without an await
export default async function Page({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
// …
}Prompt for Cursor or Claude Code
This is a Next.js 16 app, where params, searchParams, cookies() and headers() are async. Find every page, layout, route handler and generateMetadata that reads them synchronously, type them as Promises and await them (or use() in Client Components). List each file you change.Not quite your error? Paste yours into the free VibeBoot Doctor or browse the Next.js error fixer.
next: skip the next one
Skip the debugging. The VibeBoot SaaS Starter ships with this already handled: it follows the Next.js 16 conventions (src/proxy.ts, Server Components by default, request-time data in <Suspense>) and its AGENTS.md and .cursor/rules keep your agent on them. Plus auth, Stripe and a database on Next.js 16.4.3. $49, one-time.
14-day money-back guarantee · lifetime updates
Other Next.js errors
- useState / useEffect in a Server Component
- Event handlers cannot be passed to Client Component props
- Functions cannot be passed directly to Client Components
- Only plain objects can be passed to Client Components
- "use client" must be placed before other expressions
- export "metadata" from a "use client" page
$ fixed it? get the next one first
New fixes for what AI agents break, by email.
When we add a fix or a Cursor rule for a new Next.js, Auth.js, Prisma or Stripe break, it goes out in the VibeBoot newsletter. Free, occasional, unsubscribe in one click.