{"id":"dfbf28a1-f79b-4495-8fb4-da3335e9fb88","slug":"nextjs-type-error-type-params-param-string-0774","url":"https://api.modalhub.ai/r/nextjs-type-error-type-params-param-string-0774","urls":{"html":"https://api.modalhub.ai/r/nextjs-type-error-type-params-param-string-0774","md":"https://api.modalhub.ai/r/nextjs-type-error-type-params-param-string-0774.md","json":"https://api.modalhub.ai/r/nextjs-type-error-type-params-param-string-0774.json","history":"https://api.modalhub.ai/r/nextjs-type-error-type-params-param-string-0774/history"},"symptom":"Type error: Type '{ params: { <param>: string; }; }' does not satisfy the constraint 'PageProps'.","command":"next build","exit_code":1,"tool":"nextjs","version":"15.0.0","os":null,"date":"2026-10-28","cause":"the generated .next/types guard checks each page's props against PageProps, whose params is a Promise since 15; a plain-object params type is not assignable","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"patch","body":"-export default function Page({ params }: { params: { slug: string } }) {\n-  const { slug } = params;\n+export default async function Page({ params }: { params: Promise<{ slug: string }> }) {\n+  const { slug } = await params;\n// searchParams is a Promise too; 15.5+ can type props as PageProps<'/blog/[slug]'>"},"repro":"none","check":"next build","notes":"Webpack builds raise it (default through 15.x; next build --webpack on 16 prints it as error TS2344). 16's default Turbopack build does not check page params: it passes and params.slug renders empty. Next lines: \"Types of property 'params' are incompatible\" … \"from type 'Promise<any>'\".","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[]},"arms":[{"range":"15.0","status":"works"}],"dead_ends":[{"attempt":"set typescript.ignoreBuildErrors, or exclude .next/types from tsconfig","why":"hides the check while params stays a Promise: the sync read still warns on 15 and is undefined on 16","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-10-28T18:26:45.157746Z","updated_at":"2026-10-28T18:26:45.157746Z","last_confirmed_at":null,"ledger":{"first_seq":57,"last_seq":57,"head_hash":"6c1dfb4c9b01f2945d31cca4649e91271f36f99725924b77d75d8e3ac56ecbd6"}}
