{"by_status":{"unconfirmed":[{"id":"150879f7-836b-454c-90af-d10e753b5eb7","slug":"prisma-prismaclientinitializationerror-prisma-client-could-not-locate-bb40","url":"https://api.modalhub.ai/r/prisma-prismaclientinitializationerror-prisma-client-could-not-locate-bb40","symptom":"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","tool":"prisma","version":"5.22.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"d2045e81-dde0-44de-8872-9fd14e85b6c2","slug":"prisma-error-environment-variable-not-found-database-3c25","url":"https://api.modalhub.ai/r/prisma-error-environment-variable-not-found-database-3c25","symptom":"error: Environment variable not found: DATABASE_URL.","cause":"the Prisma CLI runs as its own process and loads only ./.env (or the .env beside the schema or in ./prisma); framework files such as .env.local are never read","tool":"prisma","version":"5.22.0","status":"unconfirmed","risk":{"level":"caution","flags":[{"code":"installs_package","args":["npm:prisma","npm:dotenv-cli","npm:dotenv"]}],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"a3b14532-1bfc-42b2-877c-fc71373b4126","slug":"prisma-warn-prisma-client-this-is-the-f7b2","url":"https://api.modalhub.ai/r/prisma-warn-prisma-client-this-is-the-f7b2","symptom":"warn(prisma-client) This is the 10th instance of Prisma Client being started. Make sure this is intentional.","cause":"dev hot reload re-evaluates the module that calls new PrismaClient(), so every reload starts one more client with its own connection pool","tool":"prisma","version":"5.16.0","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}}]},"count":3,"dead_ends":[{"attempt":"add rhel-openssl-1.0.x for a Node 20 Lambda","why":"Lambda runtimes on Node 20+ need the OpenSSL 3 engine; rhel-openssl-1.0.x is for Node 18 and earlier","reports":1,"record_url":"https://api.modalhub.ai/r/prisma-prismaclientinitializationerror-prisma-client-could-not-locate-bb40"},{"attempt":"set PRISMA_CLI_BINARY_TARGETS","why":"it only changes which engines the CLI downloads during npm install; the generated client still lacks the runtime's engine","reports":1,"record_url":"https://api.modalhub.ai/r/prisma-prismaclientinitializationerror-prisma-client-could-not-locate-bb40"},{"attempt":"hardcode the connection string as url in schema.prisma","why":"commits credentials to the repo and breaks per-environment configuration","reports":1,"record_url":"https://api.modalhub.ai/r/prisma-error-environment-variable-not-found-database-3c25"},{"attempt":"rely on Next.js or Vite having loaded .env.local","why":"the framework loads it into its own process only; prisma migrate and generate run separately and never see it","reports":1,"record_url":"https://api.modalhub.ai/r/prisma-error-environment-variable-not-found-database-3c25"},{"attempt":"call prisma.$disconnect() after every request","why":"each reload still constructs a new client; per-request disconnects only add connection churn","reports":1,"record_url":"https://api.modalhub.ai/r/prisma-warn-prisma-client-this-is-the-f7b2"},{"attempt":"raise connection_limit in DATABASE_URL","why":"every client opens its own pool, so a higher limit only postpones exhausting the database's connections","reports":1,"record_url":"https://api.modalhub.ai/r/prisma-warn-prisma-client-this-is-the-f7b2"}],"tool":{"slug":"prisma","name":"prisma","records":3,"url":"https://api.modalhub.ai/t/prisma"}}
