Environment Variables Not Loading Correctly in VSCode Terminal for Next.js Project
I work in VSCode on a Mac. Somehow, I found that my Next.js .env file isn’t being loaded correctly. To debug this, I added some log statements in next.config.js to check if the environment variables are being loaded properly for server-side not client-side: