Environment Variables Not Loading in Next.js 15, React 19, Turbopack #75586
Unanswered
10000leaves
asked this question in
Help
Replies: 2 comments
-
I have the same problem. |
Beta Was this translation helpful? Give feedback.
0 replies
-
it is not just the turbopack, without it i am facing this issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
In a project using Next.js 15.1.3, React 19.0.0, and Turbopack, environment variables from the .env.local file with the NEXT_PUBLIC_ prefix are not being loaded on the client side. They load correctly on the server side but return undefined on the client side.
Additional information
Environment
Environment Variables: Set in .env.local file
Code Example
Steps Taken
Additional Information
Question
Any advice on resolving this issue or additional steps to try would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions