Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'.ts(2339)
4 Replies
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the
#ask-ai
channel awaits if you're curious!Just to inform, it seems that the type definition of Prisma is not the same between this project and an other project where I used yarn
Seems like it as nothing to do with bun, Prisma changed their types export (don't know since when) but the Prisma namespace exports a lot less than before
In order to use the
PrismaClientKnownRequestError
you now need to import them from "@prisma/client/runtime/library"
Example:
If anyone knows the version that changed the export I would really like to know which onenvm
The issue is comming from the fact that since 6.6.0 you need to import Prisma from the place where prisma have generated the types (to have it, you need to check output in prisma.ts file)