79730466

Date: 2025-08-09 07:22:19
Score: 0.5
Natty:
Report link

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?

It’s telling you: “I was expecting a Promise here, not an object.”

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Ali Ahmed