Prisma type issue
I'm having a difficult time figuring out why this error is occurring (pictured).
I created a model within schema.prisma for the input ("address") to be pushed into.
I npx db pushed and generated. It then will prompt me npx prisma format, which adds this to the premade Account model:
Any help is appreciated.
Solution:Jump to solution
The schema looks fine for what the error is showing for, so it's not related to the schema (although you should evaluate it logically to confirm it's what you want)
Use your Code Editor's LSP: type
ctx.prisma.
and see how the URLData
is being shown in it...8 Replies
First off, did you push after the 2nd prompt n' fix or before
Secondly, did you run
prisma generate
?
if that doesn't work then: can you share all of the models in question here? as the Account and Session model need that @relation
which I need to see to know if it is properly set or not
Yes, I did both
then
Solution
The schema looks fine for what the error is showing for, so it's not related to the schema (although you should evaluate it logically to confirm it's what you want)
Use your Code Editor's LSP: type
ctx.prisma.
and see how the URLData
is being shown in itusually when we define models in prisma, the generated ones show in lowercase with
ctx.prisma
for example the User
model is ctx.prisma.user
not ctx.prisma.User
Even your error message is hinting to it
Okay, that seems to have fixed it.
Thanks for the help.