0

I have created two environment variables with the below values:

STORE_DOMAIN='www.store.com';
STORE_ACCESS_TOKEN='123456789';

When I try to access these environment variables in my nextjs app like,

domain = process.env.STORE_DOMAIN
token = process.env.STORE_ACCESS_TOKEN

console.log("domain " + domain + " api " + token)

I am getting the domain value in console.log 2 times, and I'm unable to get the token value.

I want to get the value of both domain and token. Please help.

Anciline
  • 19
  • 4
  • why do you have semicolon btw? Prefix the env variables with ``NEXT_PUBLIC_`` @ https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser – OMi Shah Aug 25 '23 at 10:20
  • Does this answer your question? [NextJS environment variables aren't working](https://stackoverflow.com/questions/63257107/nextjs-environment-variables-arent-working) – OMi Shah Aug 25 '23 at 10:24

0 Answers0