juniperxxd
juniperxxd
Explore posts from servers
PPrisma
Created by juniperxxd on 4/9/2025 in #help-and-questions
TypeScript errors with new `prisma-client` generated client
Hello people! I have a small question: I tried to update a small project to use the new generated client feature. It runs fine and it all works as it should, but when I run tsc -b to perform type checking, it fails with
app/generated/prisma/client/client.ts:341:16 - error TS4094: Property '_brand_DbNull' of exported anonymous class type may not be private or protected. 341 export const DbNull = runtime.objectEnumValues.instances.DbNull ~~ app/generated/prisma/client/client.ts:341:16 341 export const DbNull = runtime.objectEnumValues.instances.DbNull ~~ Add a type annotation to the variable DbNull. app/generated/prisma/client/client.ts:348:16 - error TS4094: Property '_brand_JsonNull' of exported anonymous class type may not be private or protected. 348 export const JsonNull = runtime.objectEnumValues.instances.JsonNull ~~ app/generated/prisma/client/client.ts:348:16 348 export const JsonNull = runtime.objectEnumValues.instances.JsonNull ~~ Add a type annotation to the variable JsonNull. app/generated/prisma/client/client.ts:355:16 - error TS4094: Property '_brand_AnyNull' of exported anonymous class type may not be private or protected. 355 export const AnyNull = runtime.objectEnumValues.instances.AnyNull ~ app/generated/prisma/client/client.ts:355:16 355 export const AnyNull = runtime.objectEnumValues.instances.AnyNull ~ Add a type annotation to the variable AnyNull. Found 3 errors.
I'm not quite sure how to resolve this. Does anyone have a suggestion? I made a public reproduction: https://github.com/jensmeindertsma/fuel/pull/6 feel free to clone this branch and run pnpm install && pnpm typecheck to see the issue. Thanks so much in advance!
8 replies