Environment variable doesn't work in Vercel

Viewed 88

In my Vercel's app dashboard I set environment variable BACKEND_URL for Preview environment and dev branch:

enter image description here

However after deploying it, the variable doesn't seem to work. My site can't access the api.

I added this quick way of checking what is inside process.env.BACKEND_URL and as expected - it is empty.

<Text>Backend URL: {process.env.BACKEND_URL}</Text>

enter image description here

Here is the screenshot of Vercel build which shows that the newest deploy is in fact Preview and from dev branch:

enter image description here

What am I doing wrong?

0 Answers
Related