P
Prisma•3mo ago
samuelcole

rust-free engine with accelerate

is anyone using accelerate with rust-free prisma?
Error [PrismaClientValidationError]: Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.
Error [PrismaClientValidationError]: Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.
i guess i don't need to run prisma generate on deploy anymore, since i checked in all the generated files? but am i still supposed to have an adapter option in production, when using an accelerate connection string? for context, we use direct connections to postgres databases on localhost and preview environments, but accelerate in production
11 Replies
Prisma AI Help
Prisma AI Help•3mo ago
You decided to hold for human wisdom. We'll chime in soon! Meanwhile, #ask-ai is there if you need a quick second opinion.
samuelcole
samuelcoleOP•3mo ago
guessing and checking a bit here:
Error [PrismaClientValidationError]: Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.
Error [PrismaClientValidationError]: Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.
so i'm not supposed to use adapter with an accelerate url but if i don't use it:
Error [PrismaClientConstructorValidationError]: Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.
Error [PrismaClientConstructorValidationError]: Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.
my understanding is that engineType = "client" is required in my schema to not output rust binaries https://www.prisma.io/blog/rust-free-prisma-orm-is-ready-for-production#getting-started-with-the-rust-free--esm-first-prisma-orm
samuelcole
samuelcoleOP•3mo ago
soooo.... how is this supposed to work?
No description
samuelcole
samuelcoleOP•3mo ago
In Prisma ORM 6.16.0, we've enabled usage of the new engineType = client with Prisma Postgres, but our validation rules permitted invalid combinations of Prisma Postgres URLs and driver adapters. This now produces a clear error message indicating Prisma Postgres URLs and driver adapters are mutually exclusive.
i still don't understand how we're supposed to use a driver adapter for local development (and preview environments) and accelerate in production
samuelcole
samuelcoleOP•3mo ago
this might be a github issue for this: https://github.com/prisma/prisma/issues/28098
GitHub
Using Rust-free Prisma ORM with Prisma Accelerate errors create Pri...
Bug description Using the new Rust free Prisma ORM with Prisma Accelerate and the PgAdapter fails to instantiate a PrismaClient. Error message below: Prisma Client was configured to use the `adapte...
samuelcole
samuelcoleOP•3mo ago
cc @Nurul since you're on the github issue (and evidently prisma's only developer support engineer ha!)
Nurul
Nurul•3mo ago
Hey! Could you try out this example and check if you still get the same error? https://github.com/nurul3101/ppg-rust-free-orm-example
GitHub
GitHub - nurul3101/ppg-rust-free-orm-example
Contribute to nurul3101/ppg-rust-free-orm-example development by creating an account on GitHub.
samuelcole
samuelcoleOP•3mo ago
ah, your example inspired me: https://github.com/prisma/prisma/issues/28098#issuecomment-3352585079 i think it's something about providing an adapter: undefined key to options causes prisma to error out
GitHub
Using Rust-free Prisma ORM with Prisma Accelerate errors create Pri...
Bug description Using the new Rust free Prisma ORM with Prisma Accelerate and the PgAdapter fails to instantiate a PrismaClient. Error message below: Prisma Client was configured to use the `adapte...
samuelcole
samuelcoleOP•2w ago
@Nurul i put this project on the backburner since i just couldn't get accelerate working in production with a postgres adapter for other environments (local + preview, etc) but with prisma 7 out, i figured yall fixed it I FIGURED WRONG 😭
samuelcole
samuelcoleOP•2w ago
added a comment in github to the open issue, because that seems to be the most evergreen+visible space https://github.com/prisma/prisma/issues/28098#issuecomment-3560308549
GitHub
Using Rust-free Prisma ORM with Prisma Accelerate errors create Pri...
Bug description Using the new Rust free Prisma ORM with Prisma Accelerate and the PgAdapter fails to instantiate a PrismaClient. Error message below: Prisma Client was configured to use the `adapte...
samuelcole
samuelcoleOP•2w ago
just to come back here, i think i may have been affected by this issue: https://github.com/prisma/prisma/issues/28580 gonna try this again today
GitHub
@prisma/extension-accelerate is incompatible with Prisma 7. · Issu...
Bug description When @prisma/extension-accelerate is used with Prisma 7, all types will be lost, and everything will become any. Severity 🚨 Critical: Data loss, app crash, security issue Reproducti...

Did you find this page helpful?