You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Next.js application that I'm trying to deploy and its become a nightmare for me. I'm storing my env variables in a next.config.js in this format:
When I run npm run build and npm start it works fine locally but my variables are undefined when deploying to Vercel with their environmental variables inputs. When accessing the variables in _app.js i'm using process.env.KEY but it comes up as undefined.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Next.js application that I'm trying to deploy and its become a nightmare for me. I'm storing my env variables in a next.config.js in this format:
When I run npm run build and npm start it works fine locally but my variables are undefined when deploying to Vercel with their environmental variables inputs. When accessing the variables in _app.js i'm using process.env.KEY but it comes up as undefined.
Any help would be greatly appreciated
Beta Was this translation helpful? Give feedback.
All reactions