Hi guys, good morning How I can solve this error?...
# orm-help
n
Hi guys, good morning How I can solve this error?
PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Attempted to serialize scalar 'null' with incompatible type 'String' for field condominioId.
✅ 1
r
@Naotho Machida 👋 When does this occur? Did you pass
null
in for something that needed a String?
n
condominioId is a relation with product and condominio
in my schema.prisma condominioId        String?   condominio          condominios?         @relation(_fields_: [condominioId], _references_: [id])
I can add new product in product table with no problems, but when I do
findUnique this errors show
r
What do you pass in
findUnique
?
n
options { include: { imgLarge: true }, where: { id: '1063' } }
sorry, is not a findUnique
I'm using findMany
r
Can you share the schema, I would need to reproduce. You can also try a couple of things from your end: 1. Check if this still happens if you run this on a clean database. This will help narrow down things. 2.
prisma
and
@prisma/client
are up to date or on the same version.
n
ok Ryan
I think this problem is with my server... in AWS is all ok
but when I use vercel I get this erros
AWS and Vercel points to the same database
and these use the same git repo
r
Could you run
prisma generate
again and check? Probably Vercel caching something that’s causing an issue?
n
Ryan, Vercel is a serveless so I add in my package.json
_"build"_: "export NODE_OPTIONS=--max-old-space-size=1536 && prisma generate && next build",
>>> prisma generate
THANK YOU VERY MUCH!!
🙌 1
solved the problem
💯 1