Samrith Shankar
09/17/2022, 4:09 AMerror: Error validating datasource `db`: the URL must start with the protocol `mysql://`.
Now the thing is my DATABASE_URL
is present in my Lambda configuration and when I log it, it does even print it. Don’t know why this is happening.. any idea?
Full error message:
"Runtime.UnhandledPromiseRejection: Error: error: Error validating datasource `db`: the URL must start with the protocol `mysql://`.",
" --> schema.prisma:3",
" | ",
" 2 | provider = \"mysql\"",
" 3 | url = env(\"DATABASE_URL\")",
" | ",
"",
"Validation Error Count: 1",
" at process.<anonymous> (file:///var/runtime/index.mjs:1131:17)",
" at process.emit (node:events:527:28)",
" at emit (node:internal/process/promises:140:20)",
" at processPromiseRejections (node:internal/process/promises:274:27)",
" at processTicksAndRejections (node:internal/process/task_queues:97:32)"
Client version: 3.15.2
Error message code: P1012Samrith Shankar
09/17/2022, 5:47 AMSamrith Shankar
09/17/2022, 6:46 AMSamrith Shankar
09/17/2022, 12:10 PMAlex
09/18/2022, 2:51 AMenv("DATABASE_URL")
but when i put the actual aconnection string it works, not sure how to resolve..Alex
09/18/2022, 2:55 AMDATABASE_URL
env var defined already on my local machine zshrc and it was for postgresSamrith Shankar
09/24/2022, 12:34 PMSamrith Shankar
09/24/2022, 12:34 PMNurul
09/27/2022, 8:38 AMNow the thing is myI think this has to do with the fact that env files aren’t bundled into generated prisma client any longer. (from this comment)is present in my Lambda configuration and when I log it, it does even print it.DATABASE_URL
Samrith Shankar
09/28/2022, 6:39 AMNurul
09/28/2022, 11:23 AM4.4.0
and checking if the issue still persists?