Deploying to Vercel
From what I can see by searching, it seems I'm not the first one.... But I've now been stuck for days trying to deploy to Vercel, a NextJS app using Prisma.
ā
All works fine locally
ā
I've added a postinstall script to generate the client, I see no build errors, prisma client is generated fine in the build logs
ā
prisma.myModel.findMany(....) returns data
ā prisma.myModel.create( {data} ) seems to fail silently, the console.log that follows it never runs. I've triple checked, data matches my db's schema....
I've obviously searched around, read the docs multiple times, but I'm now running out of ideas.... Would anyone here have an idea ? šš»
2 Replies
ā prisma.myModel.create( {data} ) seems to fail silently, the console.log that follows it never runs. I've triple checked, data matches my db's schema....Do you have some logs for us to look at? And is it possible that
data
is null somehow?
I could see that failing as it would do sth like:
prisma.myModel.create( { null } )
Thx for the reply mate ! Nah, no logs, other that what I'm logging myself :
console.log("data: ", data) // outputs "data: { uid: 'call_8e445f3f2d4b2536210b7a....."
const c = await prisma.call.create({
data
}); console.log("call created") // never called console.log(c) // never called btw, this is all within a try catch and no error is thrown....is there a way to get more logs from prisma?
}); console.log("call created") // never called console.log(c) // never called btw, this is all within a try catch and no error is thrown....is there a way to get more logs from prisma?