panicked at query-engine\query-engine-node-api\src\engine. Failed to deserialize constructor options
Hi guys.
I have a shared prisma package setup in one repo, and 2 other repositories (frontend and server) that use the shared prisma package.
This setup has been working very fine for a long time. but just today i added a new table and deployed the updated package (something i do every week). and it's craching my servers.
On the other projects, reinstalling the latest version of the shared package and running the projects throws this error:
dist/index.ts
shema.prisma

3 Replies
You chose to compile with the bot. One moment while I piece together your answer…
Based on the error message and your description, it appears you're experiencing a Prisma panic related to engine initialization. This is likely related to a version mismatch or missing configuration for the tracing feature.
Understanding the Error
The error message indicates that the Query Engine is missing a required field called
enableTracing
. This suggests you might be using a newer version of Prisma that has the tracing feature enabled by default or as a required configuration parameter.
Possible Solutions
1. Check Prisma Version Compatibility
The error might be occurring because you've updated to Prisma 6.1.0, which has known issues with tracing. As mentioned in this issue, there's a specific error related to tracing in version 6.1.0:
2. Add Tracing Configuration
You could try explicitly adding the tracing configuration to your PrismaClient initialization:
3. Downgrade Prisma Version
If you recently updated your Prisma version, consider downgrading to a previous stable version (like 6.0.1) until the issue is resolved, as suggested in the Tracing error in 6.1.0 issue.
4. Update Schema Configuration
You might need to update your schema.prisma file to explicitly handle the tracing feature:
5. Check for Observability Tools
If you're using observability tools like Sentry, they might not be compatible with the latest Prisma version's tracing feat
ures, as mentioned in the GitHub issue.
This appears to be a known issue with certain Prisma versions, particularly around the tracing functionality. I recommend trying the solutions above, with downgrading to a previous stable version being the quickest fix if you need to get your application running immediately.
🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly.
In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.Fixed: the issue was that when other projects use my prisma package. they install the latest version of
@prisma/client
as dep which is incompatible with the package version.
there are many fixes. but i went for setting up custom output for the prisma client in the package at ./prisma/generated/client
.
Then i edit shema.prisma
to:
And then removing the postinstall
and bundling in package.json
, replacing it with prepare
script.
I am glad to hear that you were able to identify the cause and fix it 👍