Hi Glitch Team,
I’m running into a weird issue with one of my Glitch apps. My environment variables from the .env
file are not loading into process.env
during runtime.
Here’s what I’ve done so far:
- I’ve double-checked the
.env
file – no syntax errors and variables are defined likeMY_SECRET=value
. - I’m using
dotenv
in my project, and it’s required at the top ofserver.js
. - Tried restarting the project and even duplicating it, but the issue persists.
Error I’m seeing:
javascript
CopyEdit
undefined is not a function or MY_SECRET is undefined
Has anyone else faced this issue? Could this be a bug on Glitch’s end, or am I missing something obvious?
Thanks in advance!