You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ next build
▲ Next.js 15.2.3
Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types ...Failed to compile.
app/users/[id]/page.tsx
Type error: Type '{ params: { id: string; }; }' does not satisfy the constraint 'PageProps'.
Types of property 'params' are incompatible.
Type '{ id: string; }' is missing the following properties from type 'Promise<any>': then, catch, finally, [Symbol.toStringTag]
Next.js build worker exited with code: 1 and signal: null
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Possible fast fix:
importgetRequestClientfrom"@/app/lib/getRequestClient";//import { APIError } from "@/app/lib/client";typeProps={searchParams: Promise<{[key: string]: string}>;};exportdefaultasyncfunctionUserDetails({
searchParams,}: Props){constclient=getRequestClient();const{ id }=awaitsearchParams;constresponse=await(awaitclient).user.GetUser(id);return(<section><h1>Detailfor{response.user.name}</h1><p>ID: {response.user.id}</p></section>);}
Hi.
If using
next build
from 'https://github.com/encoredev/examples/tree/main/nextjs-starter/frontend' - error buildPossible fast fix:
Using this reference for fix.
The text was updated successfully, but these errors were encountered: