Description
I am using @nuxtjs/supabase
and this package expects the .env
file in the project root directory to define SUPABASE_URL
and SUPABASE_KEY
.
However, since my project defines different environment variables for the production and staging environments, I put the respective .env
files together in the env/
directory as a management method, and there is no .env
file in the project root directory.
Therefore, I get the following warning.
WARN Missing supabase url, set it either in nuxt.config.js or via env variable
WARN Missing supabase anon key, set it either in nuxt.config.js or via env variable
It seems that you can define it in nuxt.config file, but I don't think you can define it in nuxt.config
file because SUPABASE_URL
and SUPABASE_KEY
are different in each environment.
The use of @nuxtjs/supabase
itself is working fine.
However, the warning points out that "the definitions of SUPABASE_URL
and SUPABASE_KEY
do not physically exist in the .env
, file in the project root or in the nuxt.config
file," and I don't think that resolving the environment variables to be loaded at run-time will fix the display.
What can I do to avoid the warning?