Prisma + better-auth: schema type issue
I have been struggling with this issue for the last 3 hours. Keep looking into the why I am getting an error on type after running the generate command and making a push to my local PostgreSQL database.
I have setup a simple form using ShadCN (they also use react-hook-form under the hood) and some other components such as the input field. Could anyone please help me out?

14 Replies
OBS ! Here is my
schema.prisma
file
Also one more thing I have no clue to why it's happening but because of the
generator client
where it says output = "app/generated/prisma/client
I get this random folder generated to our project. I have never seen this before...
if it is from a prisma ig you have to restart the dev server
send ur auth config file
I have done that multiple time but I still get the same error when i fill in the sign up form
what about ./database/prisma
can you send that one as well
replace the import of @prisma/client with the generated client
import {PrismaClient} from "app/generated/prisma/client" or if you have an alias make sure to prefix that as well
Like this right?
so do you get an autocompilation for PrismaClient ryt ?
ryt?
yeah. i was making sure if PrismaClient is defined when you import from the path
try it and lemme know if that does not work
Yeah seems to work now but I still don't understand why I need that output thing?
I used to do it like this before
it is from prisma not from better-auth . they have released it and change a lot of their query engine. make sure to stick with docs here and on prisma as well
this is also fine
the problem is when you want a custom output and it is need a custom client that has a query engine filled with the your schema config
That's so good to know
Well however. Thank you so, so much for the help provided. I appreciated it highly mate 🙏