Skip to content

Next.js 15 requires params in Route Handlers to be awaited #1797

@AmruthPillai

Description

@AmruthPillai

I'm using the latest @zenstackhq/server/next package, which exports the NextRequestHandler.

I get this error while running the server:

Error:  In route /api/model/[...path] a param property was accessed directly with `params.path`. `params` should be awaited before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`.

Probably NextRequestHandler should be updated to await the params props before being accessed. AFAIK, I couldn't find a way to await it myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions