Categories
Projects

Why is my NextJS site not getting environmental variables?

Because you need to “forward” your environment variables in your .env file into your next.config.js file.

env file

If you don’t add it to the next.config.js, the value of apiUrl would be “undefined”. So do this: