© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
1 reply
mojogogo3143

Environment Variables in Edge Functions local dev

Hi,

I have set up a local Supabase dev site and have been working with edge function locally. Everything seems to work as expected except for using my own env local secrets.

I followed the docs here:
https://supabase.com/docs/guides/functions#local-secrets

My
.env.local
.env.local
file contains the value for
MY_NAME
MY_NAME
, but unable to read the value using
console.log(Deno.env.get('MY_NAME')).
console.log(Deno.env.get('MY_NAME')).


if run by
supabase functions serve add-project, console.log(Deno.env.get('MY_NAME'))
supabase functions serve add-project, console.log(Deno.env.get('MY_NAME'))

it prints undefined,

and if run via command
supabase functions serve add-project --env-file ./supabase/.env.local
supabase functions serve add-project --env-file ./supabase/.env.local

it throws an error of : Error: Can't separate key from value.


The same issue is described in more detail here with screenshots:
https://github.com/supabase/supabase/discussions/8075

Has anybody else run into this? Any suggestions would be appreciated.

Thanks!
GitHub
Environment Variables in Edge Functions · Discussion #8075 · supaba...
I am trying to introduce env secrets in local edge functions. Already have the local env file create with echo "MY_NAME=Yoda" >> ./supabase/.env.local as per documen...
Environment Variables in Edge Functions · Discussion #8075 · supaba...
Supabase Documentation
Edge Functions
Globally distributed TypeScript functions.
Edge Functions
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Authorization for Local Edge Functions
SupabaseSSupabase / help-and-questions
2w ago
Referencing local monorepo packages in Edge Functions?
SupabaseSSupabase / help-and-questions
3mo ago
Supabase edge functions and local imports
SupabaseSSupabase / help-and-questions
4mo ago
Database error with local edge functions
SupabaseSSupabase / help-and-questions
13mo ago