Closed
Description
Link to the code that reproduces this issue
https://github.com/Revaycolizer/minimal-repo/tree/main/app/api
To Reproduce
- Clone repo
- next build
- 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