10 months 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
10 months 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!
10 months ago
anyone here???
10 months ago
What package manager are you using ?
10 months ago
try using BOG_CLIENT_ID in your variable and not process.env.BOG_CLIENT_ID
10 months 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.
