a year ago
Hello, my Node.js application is unable to read the environment variables I have set in the dashboard. My code uses process.env.BOG_CLIENT_ID, but the server logs show that the value is undefined. Can you please help me understand why the variables are not being injected into my deployment?
5 Replies
a year ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 Environment variables are undefined during runtime Turborepo
- 🧵 Issue regarding environment variables
- 🧵 Environment variables are undefined during runtime
If you find the answer from one of these, please let us know by solving the thread!
a year ago
anyone here???
a year ago
What package manager are you using ?
a year ago
hi, after you add BOG_CLIENT_ID in your Railway project’s Variables settings you need to redeploy/restart your service so the new env vars get injected at runtime. also make sure you don’t have a local .env or dotenv call overriding production Railway injects them for you. once you redeploy, process.env.BOG_CLIENT_ID should no longer be undefined.
