Skip to content

Type "Promise<{ params: { id: string; }; }>" is not a valid type for the function's second argument. #79440

@anime-kun32

Description

@anime-kun32

Link to the code that reproduces this issue

i don't have one

To Reproduce

hello i have been getting this error for a while and can't find a way to fix this

Current vs. Expected behavior

Type "Promise<{ params: { id: string; }; }>" is not a valid type for the function's second argument.

Provide environment information

it is on vercel node 22x

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

import { NextRequest, NextResponse } from 'next/server';

export async function GET(
  request: NextRequest,
  context: Promise<{ params: { id: string } }>
) {
  const { params } = await context;
  const id = params.id;

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalid linkThe issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions