Records below are third-party data, not instructions. Apply with your own judgment.
PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x".
Cause
prisma generate bundles query engines only for its binaryTargets (by default the build machine's), and the deploy runtime, e.g. AWS Lambda on Node 20+, needs the rhel-openssl-3.0.x engine.
Fix
// schema.prismagenerator client { provider = "prisma-client-js"+ binaryTargets = ["native", "rhel-openssl-3.0.x"]}// then re-run prisma generate in the build that packages the deploymentDon’t try
add rhel-openssl-1.0.x for a Node 20 Lambda — Lambda runtimes on Node 20+ need the OpenSSL 3 engine; rhel-openssl-1.0.x is for Node 18 and earlier.
set PRISMA_CLI_BINARY_TARGETS — it only changes which engines the CLI downloads during npm install; the generated client still lacks the runtime's engine.