Getting error this.getGlobalTracingHelper(...).dispatchEngineSpans is not a function
Hello!
I just installed the prisma extension optimize, I'm using:
- Node: 20.x
- TypeScript: ^5.5.3
- Express: ^4.19.2
- Prisma: ^6.1.0
- @prisma/client: ^6.1.0
- @prisma/extension-optimize: ^1.1.1
I updated the prisma file to allow this feature like this:
then I updated the prisma client to look like this:
however once I run the app I get this error:
Thanks in advance.
4 Replies
Hello @N I C O 👋
Thank you for reporting this error. I was able to reproduce this in version Prisma v6.1.0.
Can you try using the version 6.0.0 and check?
For me it worked in version 6.0.0 and not in 6.1.0. I have informed our team to look into this 🙏
@Nurul Thanks for answering, indeed it works in prisma v6.0.0, but I now have a new problem, my model has Ids as BigInt and I think that at the moment of sending the query, optimize can't process this Ids
personally I use this script to send bigints back to the client
We have this recommendation for serializing BigInt: https://www.prisma.io/docs/orm/prisma-client/special-fields-and-types#serializing-bigint
It looks like you are doing the same.
Let me try to use a BigInt type and try to reproduce this error
Fields & types | Prisma Documentation
Learn how to use about special fields and types with Prisma Client.
You are correct! I am able to reproduce the BigInt serialization error. I am reporting this as well 🙏
@N I C O Can you try the latest Optimize extension version 1.1.4? This should fix both the issues you were observing.
Thank you for reporting 🙏