Skip to content

Bug Report: Invalid Type Error for Route Handler's Second Argument in Next.js 15 #1

Description

@shellen

Expected Behavior

Build should succeed as the type pattern follows Next.js documentation.

Environment

  • Next.js version: 15.1.0
  • TypeScript version: [5]
  • Node.js version: [18.18.0]
  • Operating System: [macOS]

Additional Context

  • This issue appeared after upgrading to Next.js 15

  • Multiple type patterns have been tried:

    • { params: { id: string } }
    • RouteContext interface
    • Direct inline types
    • Type assertions

    See Readme for more trial/error.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions