-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unhandled Runtime Error TypeError: prisma.$on is not a function #2
Comments
I'm sorry for the late reply. Did you manage to resolve this issue? If not, does it only happen in the browser or also on the server? |
I had this issue today. |
+1 |
1 similar comment
+1 |
+1 |
1 similar comment
+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the problem?
While using the enhancePrisma Prisma client from Blitz, prisma.$on throws a runtime type error in the browser saying
TypeError: prisma.$on is not a function
. However, Prisma middleware such as prisma.$use(...) appears to work and be recognized by typescript. In VS Code it shows me the intellisense and doesn't highlight it as a type error, but during runtime usingblitz dev
it throws an error in the browser.Paste all your error logs here:
Paste all relevant code snippets here:
What are detailed steps to reproduce this?
enhancePrismaClient.$on("query", (e) => {...})
blitz dev
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
The text was updated successfully, but these errors were encountered: