Skip to content

NextResponse error after upgrading to version 13.5.2 #55768

Closed
@Revaycolizer

Description

@Revaycolizer

Link to the code that reproduces this issue

https://github.com/Revaycolizer/minimal-repo/tree/main/app/api

To Reproduce

  1. Clone repo
  2. next build
  3. See type error on GET route handler

Current vs. Expected behavior

Expected to return data but instead it throws an error stating that Promise<NextResponse | undefined>" is not a valid GET return type:

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 16.17.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.5.2
      eslint-config-next: 13.5.2
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A

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

App Router

Additional context

nexterror
I am deploying my application in vercel

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.lockedstaleThe issue has not seen recent activity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions