Not sure if I’m doing something wrong but suddenly...
# sst
d
Not sure if I’m doing something wrong but suddenly our
.env.local
env vars are not being loaded into the process.env in the
sst.Stack
we just moved from
0.48.0
to
0.50.2
t
Is this under SST start
d
yes
yarn start
but I have this in package.json
“scripts”: { “test”: “sst test”, “start”: “sst start”, “build”: “sst build”, “deploy”: “sst deploy”, “remove”: “sst remove”, “buildfrontend” “ls” },
file is in root…
contents of env.local
DATADOG_API_KEY=NOTTELLING
stack.ts
console output…
🤦‍♂️ I guess I need to get the var INSIDE the
sst.Stack
moving it into the stack code WORKED
g
thats weird mine works even outside the stack
d
I thought mine did before too. 🤷
t
That's strange 🤔
ö
@Dan Van Brunt Can you restart the process? 😄
It’s because environment variables are loaded only once and at the beginning of the Node process.
d
restart which process ?
I’ve definitly stopped the
yarn start
process and then run it again
the above is still true
only works for me IN the stack
ö
I see. I have no idea why…