Mischa
03/20/2022, 3:46 PMInvoke Error {"errorType":"Error","errorMessage":"error: Error validating datasource `db`: the URL must start with the protocol `postgresql://` or `postgres://`.\n --> schema.prisma:9\n | \n 8 | provider = \"postgresql\"\n 9 | url = env(\"DATABASE_URL\")\n | \n\nValidation Error Count: 1","clientVersion":"3.6.0","stack":["Error: error: Error validating datasource `db`: the URL must start with the protocol `postgresql://` or `postgres://`."," --> schema.prisma:9"," | "," 8 | provider = \"postgresql\""," 9 | url = env(\"DATABASE_URL\")"," | ","","Validation Error Count: 1"," at Object.request (/node_modules/@prisma/client/runtime/index.js:39051:15)"," at Runtime.IY (/lib/lambdas/cognito/preSignUp.ts:25:23)"]}
• Generated 3.9.0 client with PRISMA_CLIENT_ENGINE_TYPE='dataproxy' prisma generate
• Set my DATABASE_URL
to prisma://....
• Set previewFeatures = ["dataProxy"]
in generator client {}
What am I missing here?Jakub
03/22/2022, 11:54 AMprisma://
connection string makes it to the app through DATABASE_URL
but the generated client is not expecting it. I would verify what you're bundling for your lambda (maybe there is a generation step in your deployment process that doesn't change the client type?). Also: you mention you generate 3.9 client but the error message mentions 3.6 so it may suggest some mixup in your setupMischa
03/22/2022, 11:55 AMMischa
03/22/2022, 11:56 AMJakub
03/22/2022, 12:00 PMMischa
03/22/2022, 12:01 PMJakub
03/22/2022, 12:03 PMnode_modules/.prisma/client/index.js
and search for engineType
. I'd expect to see dataproxy
for engineType
but if it's different, it means that you don't use a data-proxy-enabled clientMischa
03/24/2022, 1:24 PMengineType