R
Railway2y ago
nball

dotenv not working? How are you accessing your ENV?

Service variables are correct in Railway, yet build fails due to missing variables. Local builds work fine with dotenv, however require('dotenv').config(); does not appear to be working on Railway. I must be missing something obvious! Any ideas? PID: 06cbb529-6fb3-4792-84b5-af7b23eb272f
4 Replies
Percy
Percy2y ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
Percy
Percy2y ago
No project ID was provided. Closing thread.
Brody
Brody2y ago
on railway dotenv would fail silently since you aren't committing your .env file to github, you would have your variables set in the service settings
Want results from more Discord servers?
Add your server