Module bundlers bundle JavaScript modules into a single JavaScript file. Most bundlers work by copying over the JavaScript code from a variety of source files into the target file.
Since Prisma Client is not only based on JavaScript code, but also relies on the query engine binary file to be available, you need to make sure that your bundled code has access to the binary file.
[!NOTE]
As of v6.16.0, Prisma ORM can be used without Rust engines in production applications. Learn more in the No Rust engine documentation.
When enabled, your Prisma Client will be generated without a Rust-based query engine binary:
prisma
generator client {
provider = "prisma-client-js" // or "prisma-client"
output = "../src/generated/prisma"
engineType = "client" // no Rust engine
}
Note that driver adapters are required if you want to use Prisma ORM without Rust engines.
Deploy Prisma ORM: Learn more about the different deployment paradigms for Node.js applications and how they affect deploying an application using Prisma Client.
Deploy to a different OS: Learn how to deploy Node.js and TypeScript applications that are using Prisma Client to a different operating system.