I am trying to get my environment variables in one of my pages, but it is always returning undefined. I have no issues with accessing the variables in api folder but in pages/page.tsx it doesn't return the variables.
I access my variables using
const SECRET = process.env.SECRET from my .env file.
How can I fix this issue?