prisma: Confusing error message when trying to use engine type the client was not generated with
When generating the client for the library engine, trying to use the binary engine like this:
PRISMA_CLIENT_ENGINE_TYPE=binary ts-node index.ts
produces the following error:
PrismaClientValidationError: Invalid client engine type, please use `library` or `binary`
It should only list the engine types this generated client supports.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 35 (4 by maintainers)
@janpio I ran into this error when trying to switch from the regular prisma client to edge (to enable running client w/ Vercel AI).
This is how I set up the client:
And this is my generator:
Error:
You could try this solution:
schema.prismaimport { PrismaClient } from "@prisma/client";I used this
npx prisma generate --no-engineI have solved it.
any updates on this? I’m using prisma with lucia in nextjs and this error popped up
Thanks, it worked. Kudos!
I’m using vercel edge and “npx prisma generate --no-engine” still not worked
npx prisma generate --no-engine
this worked for me
PS: I am not having any engine specified in the prisma.Schema file
I’m getting this error using deno
Update: I regenerated and it went away.
@janpio Here’s a repro: https://github.com/frixaco/test-prisma-edge-nextjs
It’s a simple Next.js (App Router) setup with Prisma. Error happens when using Edge client for me, running
pnpm build.I am getting this error in a Turborepo setup.