Replies: 1 comment 11 replies
-
I have the same issue atm. Did you solve the issue already? |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi there,
i hope there might be someone who knows next.js deployment architecture well enough to be able to help me with an issue that i can't find a solution for.
i manage deployment variables in .env file like this:
i need to access VARIABLE_NAME 's value in api routes (functions).
everything works when i run "npm run dev" or "npm run build + npm run start".
but as soon as i deploy the project to vercel via "vercel" or "vercel prod" the value of the VARIABLE_NAME is undefined or empty or not there. strangely enough is that the NEXT_PUBLIC_NAME 's value can be used inside the api routes functions.
if i create a new project with next and do the same thing the .env mechanism works also when i deploy to vercel.
any help is much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions