Next.js Discord

Discord Forum

New route system (app dir) error

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

5 Replies

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