DenoDDeno
Powered by
kemicofaK
Deno•7mo ago
kemicofa

Unable to access injected env variables like PGHOST from connected Postgres Database

edit: seems more appropriate to add it to #deploy™-ea

After reading the documentation, my understanding is that there are environment variables from my connected database that are injected automatically.

I'm attempting to run a migration command with drizzle during the build step (I've set a "Build command" in my app's configuration in the dashboard).. however it appears that these environment variables are undefined, looking at my failed builds.

deno -A --node-modules-dir npm:drizzle-kit migrate
deno -A --node-modules-dir npm:drizzle-kit migrate


I also read that some environment variables may not necessarily be accessible during the build step.. is this what's happening? How can I run this command successfully? Thanks
Screenshot_2025-09-06_at_23.28.39.png
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Unable to load env variables in local
moubliniMmoublini / help
3y ago
how to load env variables from .env file in task
shultz🇮🇱Sshultz🇮🇱 / help
2y ago
Env variables based on deployment
Deno AI HelperDDeno AI Helper / help
3y ago
Scoping env variables per module?
bartlomiejuBbartlomieju / help
3y ago