P
Prisma12mo ago
bill92

`PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime` error

I'm having an error when trying to bundle my application with ts up
PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "darwin-arm64".

This is likely caused by a bundler that has not copied "libquery_engine-darwin-arm64.dylib.node" next to the resulting bundle.
Ensure that "libquery_engine-darwin-arm64.dylib.node" has been copied next to the bundle or in "packages/api/dist".

We would appreciate if you could take the time to share some information with us.
Please help us by answering a few questions: https://pris.ly/engine-not-found-bundler-investigation
PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "darwin-arm64".

This is likely caused by a bundler that has not copied "libquery_engine-darwin-arm64.dylib.node" next to the resulting bundle.
Ensure that "libquery_engine-darwin-arm64.dylib.node" has been copied next to the bundle or in "packages/api/dist".

We would appreciate if you could take the time to share some information with us.
Please help us by answering a few questions: https://pris.ly/engine-not-found-bundler-investigation
7 Replies
bill92
bill92OP12mo ago
The error is fixed when copying the libquery_engine-darwin-arm64.dylib.node file right next to my bundle I need to do this manually, are there any workarounds I can make for this?
roobr
roobr12mo ago
did you find a resolution for this? @bill92
David
David11mo ago
Did you?
saj
saj3w ago
did anyone else find a solution to this? i dont want a manual workaround. the nextjs workaround webpack solution also doesn't work (and also i don't want to use webpack). every thread i find related to this has ended with zero real solutions @Nurul
Nurul
Nurul3w ago
Are you also trying to bundle the application with ts up? Is this happening on latest prisma version (6.6.0)?
saj
saj3w ago
Latest version, not ts up. I moved some stuff around and reconfigured the next.config.js and it appears to work in prod now. Honestly prisma-client will be the solution to this, the node_modules issues in monorepo can be a pain so I’m excited to see this in early access! https://x.com/prisma/status/1910649283159986273?s=46
Prisma (@prisma) on X
💡 In v6.6.0, we launched a new generator called `prisma-client` in Early Access: 🌟 Requires an `output` path (no more “magic” generation into `node_modules`) ✅ Supports ESM & CommonJS via `moduleFormat` 👾 Outputs plain TS that's bundled just like the rest of your code
From An unknown user
X
Nurul
Nurul3w ago
I am glad to hear that you were able to make it work. Thank you so much for your kind words 🙂 We are looking forward to make prisma-client the default provider with Prisma 7

Did you find this page helpful?