© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4mo ago•
4 replies
lorryyap

DATABASE_URL env variable not found

Not sure whether this is a supabase or prisma or .env question, but this is where I got stuck:

schema.prisma has been created and i'm doing a npx prisma db push terminal command but got the error

----

Prisma schema loaded from prisma\schema.prisma
Error: Prisma schema validation - (get-config wasm)
Error code: P1012
error: Environment variable not found: DATABASE_URL.
--> prisma\schema.prisma:10
|
9 | provider = "postgresql"
10 | url = env("DATABASE_URL")
|

Validation Error Count: 1
[Context: getConfig]

Prisma CLI Version : 6.17.1

---

I've verified that the the .env.local file exists and that gitignore specifically did !.env.local. The DATABASE_URL in .env.local is also correct.

I'm on Windows 11 Home, PowerShell Terminal

Thanks in advance for any help and guidance.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Database hostname not found
SupabaseSSupabase / help-and-questions
5mo ago
Edge function, custom domain and `SUPABASE_URL` env variable
SupabaseSSupabase / help-and-questions
13mo ago
How to correctly set React API URL env variable for Self hosted
SupabaseSSupabase / help-and-questions
4y ago
Env variable in nodejs to init client
SupabaseSSupabase / help-and-questions
4y ago