Next.js Discord

Discord Forum

Vercel Postrgres with Reducers

Answered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
Hello. I'm trying to deploy my app using vercels postgres. I'm using Prisma as my ORM. I've looked through the error codes on their website to troubleshoot and I can't find my specific error.
Answered by Rafael Almeida
this function signature is for API Routes which don't work in the App router. see the docs for Route Handlers which is what you need to use with the App router: https://nextjs.org/docs/app/building-your-application/routing/route-handlers
View full answer

9 Replies

how does your function declaration in create-todo-table/route.ts look like? by the error message it sounds like it is typed as if it would receive route params which is impossible given the file path
Dwarf CrocodileOP
@Rafael Almeida
I am using reducers to hit my API endpoints
I don't know if that has anything to do with it
I am very inexperienced with coding. Please excuse my terminology if it is incorrect and feel free to correct anything I say that is wrong.
this function signature is for API Routes which don't work in the App router. see the docs for Route Handlers which is what you need to use with the App router: https://nextjs.org/docs/app/building-your-application/routing/route-handlers
Answer
Dwarf CrocodileOP
Oka perfect. These are what the rest of my routes look like. If this is the bulk of why I'm getting this error that's good
Thank you
I appreciate it