S
Supabase•4w ago
claas.sh

[SOLVED] Nuxt App - Your project's URL and Key are required to create a Supabase client!

Hey, So I made a Nuxt App with Supabase as backend. It works totally fine when using bun run dev Now I dockerized that App and set the Environment Variables as following
NODE_ENV=production
SUPABASE_URL=(selfhosted url)
SUPABASE_KEY=(anon key)
NODE_ENV=production
SUPABASE_URL=(selfhosted url)
SUPABASE_KEY=(anon key)
In my nuxt.config.ts I set following:
supabase: {
url: process.env.SUPABASE_URL,
key: process.env.SUPABASE_KEY,
redirect: false
},
supabase: {
url: process.env.SUPABASE_URL,
key: process.env.SUPABASE_KEY,
redirect: false
},
I verified that the Nuxt App does see the process.env.supabase (via console.log in the nuxt app and "env" command in shell of the container) Any other idea why it is stil lsaying that I need to set the url?
4 Replies
garyaustin
garyaustin•4w ago
If you don't pick up an answer here, just remember Nuxt has its own Superbase shell around supabase-js.
claas.sh
claas.shOP•4w ago
oh, I didnt know that. Do they have an official Discord? I found it. I'll ask there too. Thank you 😄 should I use nuxtjs/supabase or supabase/supabase-js in your opinion. I dont seem to find a clear difference and/or docs for the supabase/supabasejs
garyaustin
garyaustin•4w ago
Sorry, I don't know use Nuxt. Everyone I've seen using Nuxt uses their "shell".
claas.sh
claas.shOP•4w ago
I had to set the NUXT_PUBLIC_SUPABASE_URL btw

Did you find this page helpful?