-
Notifications
You must be signed in to change notification settings - Fork 20
PrismaClientConstructorValidationError: Unknown property _originalClient provided to PrismaClient constructor. #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The same issue |
@Luchanso can you provide a full reproducible example code repo? |
This is a floating bug (now everything okey) and I'm sure this 100% in prisma-adapter, and I think problem can be with instanceof, when prisma client saved like "options" (not like instance of prisma client) |
After testing, I found that this issue doesn't occur with Prisma versions 6.0.0 and 6.1.0, but starts appearing in versions after 6.1.0. As mentioned in comment #62 (comment), the problem seems to be caused by the code at https://github.com/node-casbin/prisma-adapter/blob/master/src/adapter.ts#L27. I tried printing to the console and found that the result is false. I believe this is related to how the instanceof check is handled when the Prisma client is saved as "options" rather than as an instance of the Prisma client. This explains why the behavior changes between different Prisma versions. |
@Luchanso @wuhao1477 can you make a PR to fix it? |
Hello! Could you kindly help me understand an issue I’m having with the Casbin adapter for Prisma@6?
Error: PrismaClientConstructorValidationError: Unknown property _originalClient provided to PrismaClient constructor.
The text was updated successfully, but these errors were encountered: