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
if run by
it prints undefined,
and if run via command
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!
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 file contains the value for MY_NAME, but unable to read the value usingconsole.log(Deno.env.get('MY_NAME')).if run by
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.localit 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
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...