S
Supabase4w ago
Boby

[Bug]: not picking the env

I have just created a new project using the default template i.e. supa w next.js and I have added these values NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY in my .env.local file, but I am still seeing this message thatSupabase environment variables required I have also restarted the server. TIA 🙏
No description
No description
No description
17 Replies
OakRatos
OakRatos4w ago
@Boby Just change the file name to from .env.local to .env
Boby
BobyOP3w ago
thanks for your help @OakRatos I have changed the file name to .env but still seeing the same error
No description
No description
OakRatos
OakRatos3w ago
@Boby Can you share the project url in pm?
silentworks
silentworks3w ago
Did you get this working?
Boby
BobyOP3w ago
Nope, I am still facing the same issue
inder
inder3w ago
I don't see any errors. I simply cloned your repo and updated values in .env file
silentworks
silentworks3w ago
Are you sure your .env file is in your project root?
Boby
BobyOP3w ago
Yes you can refer this ss,
Boby
BobyOP3w ago
No description
Boby
BobyOP3w ago
Don't know why didn't work for me, I will try creating new project in the dashboard and will see if it's working with the new creds.
inder
inder3w ago
Delete your .next folder and rerun the server Sometimes its a cache issue
Boby
BobyOP3w ago
no luck
No description
Boby
BobyOP3w ago
Deleted the .next folder and reinstalled but still facing the same issue
inder
inder3w ago
Works fine for me. Again just cloned your repo and added values in .env file
No description
No description
inder
inder3w ago
Are you using the correct syntax in env files? Create a copy of .env.example file and name it .env Then add values in .env file
Boby
BobyOP3w ago
Okay, I am able to console log the credentials, but don't know what's the issue, will get back to you if I will be able to solve it

Did you find this page helpful?