process.env variable returns undefined
I have my project, and I'm trying to get variables from it, I have declared it in the "Variables" section, but it just returns "undefined" when I try to run it
Solution:Jump to solution
are you using railway run? if not, thats what you would want to be using for this usecase
15 Replies
Project ID:
c79bd679-e479-4c34-b56d-1acc8c93dfc0
c79bd679-e479-4c34-b56d-1acc8c93dfc0
are you attempting to use these variables at build or deploy
I'm trying to use it running locally
Just the yarn run start
Solution
are you using railway run? if not, thats what you would want to be using for this usecase
hmmm
I don't thibk so
Just run railway run?
do you think you could share why these variables would become available locally purely by setting them on railway?
It's been a while since I don't use railway, I'm coming back to it just now, but got the idea
Sorry
that would be quite the backdoor railway would have if they could magically set environment variables on your computer without you doing anything
HAHAHAHA
That's true
I was kinda confused actually, but I was hoping some magic could happen ahahaha]
Thanks, it's working now
you might be coming back to to railway but your brain has yet to arrive at the station
always should run railway run yarn run start, then?
correct
Sure sure hahaha
Thanks