Basically it means…
Your project isn’t on the “old” stable Next.js behavior anymore.
In older versions of Next.js App Router API routes, this worked:
ts
CopyEdit
exportasync function PUT(request: Request, { params }: { params: { userID: string } }) { console.log(params.userID); // ✅ direct access }
because params
was just a plain object.
But in newer / canary (experimental) versions of Next.js, they changed it so:
ts
CopyEdit
context.params // ❌ not a plain object anymore
is actually a Promise that you need to await
:
ts
CopyEdit
const{ userID } = await context.params;
Why the change?
This is part of their new streaming / edge runtime updates.
It allows Next.js to lazily fetch dynamic route parameters for certain deployments (especially when running API routes at the Edge).
That’s why your build compiler is complaining:
Type '{ userID: string; }' is missing ... Promise methods...
It’s telling you: “I was expecting a Promise here, not an object.”