👋 This seems like an issue with your Route Handler code. Route Handlers export different functions with the HTTP verbs like GET and POST. Based on the second line, this seems like a TypeScript issue.
You likely want something like this:
1import { NextRequest, NextResponse } from 'next/server';23export async function POST(4 request: NextRequest,5 { params }: { params: { id: string } }6) {7 const { id } = params;8 return NextResponse.json(id)9}
And notably, with Next.js 15, the request APIs like params, searchParams, cookies(), and headers() were made async. So, a v15-ready version of the above would be this (also notably, if you aren't using anything specific in the NextRequest or NextResponse abstractions on top, you can use the underlying Web APIs. I'll do that here for demonstration):
1export async function POST(2 request: Request,3 { params }: { params: Promise<{ id: string }> }4) {5 const { id } = await params;6 return Response.json(id)7}