Next.js Discord

Discord Forum

New route system (app dir) error

Answered
Kokoni posted this in #help-forum
Open in Discord
Avatar
KokoniOP
I'm getting this error when using the new path system with the app directory
Image
Image
Answered by Asian black bear
So return NextResponse.json(...)
View full answer

5 Replies

Avatar
Asian black bear
You need to return something
Not just call the function
Avatar
Asian black bear
So return NextResponse.json(...)
Answer
Avatar
KokoniOP
Oh, it's true. I forgot it.
Tysm