Environment variables are undefined in route file #58962
Answered
by
icyJoseph
rajat1saxena
asked this question in
App Router
-
|
Following is my Response What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Answered by
icyJoseph
Nov 27, 2023
Replies: 1 comment 1 reply
-
|
Hi, Is the This function might be getting optimized into an static JSON file. Try adding If that fixes it, you need to learn on how to opt-out from this behavior, here: |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rajat1saxena
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Is the
.envfile present at build time?This function might be getting optimized into an static JSON file.
Try adding
export const dynamic = 'force-dynamic'to the file.If that fixes it, you need to learn on how to opt-out from this behavior, here: