VSCode TS Server and typescript compiler giving different results with prisma

I have prisma setup on a rather large project which has been compiling fine until today. Looking over the commit logs there has been no changes in our prisma files, setup or the code which is erroring. In VS code it is managing to find the types for our models and their respective query types (find many, delete) But when building nextjs it gives me an error saying that the propertydoesn’t exist on type PrismaClient<PrismaClientOptions, never, DefaultArgs> Super stumped as to what the issue is, the only changes have been on a completely separate api route which only uses raw query and no changes to prisma or the api route giving the type error. I have tried updating prisma to 5.2.0, re-generating the prisma client but I don’t understand why the issue has randomly shown up and only on build not in VS code (it can find all the models)
1 Reply
Andrea Peverelli
Andrea Peverelli15mo ago
i think that if it happens on build is worst than in vs code, maybe some @types not updated correctly? package.json? and tsconfig
Want results from more Discord servers?
Add your server