Next.js Discord

Discord Forum

Vercel environment variables not being recognized

Unanswered
Barbary Lion posted this in #help-forum
Open in Discord
Barbary LionOP
I have a web app that I deployed for testing and for some reason most of the environment variables do not work. Some do and some work in different parts of the application but most don’t which I don’t really understand. I’ve tried redeploying multiple times to no avail. Any tips would be appreciated.

3 Replies

@Barbary Lion I have a web app that I deployed for testing and for some reason most of the environment variables do not work. Some do and some work in different parts of the application but most don’t which I don’t really understand. I’ve tried redeploying multiple times to no avail. Any tips would be appreciated.
vercel can access only everything that is uploaded to github. Env variables that are not uploaded to github can be added when you navigate in your project -> settings -> environment variables. There you can add the ones, that are not accessable via github so that you have all env variables as needed
@Barbary Lion solved?
Spectacled bear
If you want to try which variables you can access or not, I'd say to add a console log at the start of your application i.e

console.log(process.env)

You can check logs on Vercel to see which variables are getting populated.