Next.js · silent bug

params.slug is undefined (params is a Promise)

what it looks like
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

  1. Type params as a Promise and await it in Server Components
  2. In a Client Component, unwrap it with React's use(params)
  3. Search the codebase for params. and searchParams. without an await
src/app/blog/[slug]/page.tsx
export default async function Page({
  params,
}: {
  params: Promise<{ slug: string }>;
}) {
  const { slug } = await params;
  // …
}

works with Next.js 16.4.3 · React 19.3last verified

prevent it · nextjs-app-router.mdc (free Cursor Rules Pack): Params and searchParams are awaited: 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

$ 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.

Subscribe free