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: open
- Created 9 months ago
- Reactions: 3
- Comments: 25 (3 by maintainers)
You could try this solution:
schema.prisma
import { PrismaClient } from "@prisma/client";
@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:
I used this
npx prisma generate --no-engine
I have solved it.
@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
.any updates on this? I’m using prisma with lucia in nextjs and this error popped up