Ross Gerbasi
01/21/2022, 10:39 PM.env
files before a Stack class, they only seem to exist at constructor time. is this expected? seems odd even if I add import 'dotenv/config'
myself to my index.ts
or the stackthdxr
01/21/2022, 10:40 PMthdxr
01/21/2022, 10:41 PMRoss Gerbasi
01/21/2022, 10:41 PMconsole.log(process.env)
before export default class is different then in the constructorRoss Gerbasi
01/21/2022, 10:46 PMRoss Gerbasi
01/21/2022, 10:47 PMRoss Gerbasi
01/21/2022, 10:48 PMRoss Gerbasi
01/21/2022, 11:01 PMRoss Gerbasi
01/21/2022, 11:16 PM.build/lib/index.js
I am not sure how this gets generated but i dont see anything in here to load the .env.stage
or env.local
file anywhere. My process.env checks within my stacks are surfaced to the very top. So when they are missing the errors throw.
Think I will need to rework how i do this here.thdxr
01/24/2022, 2:52 PMthdxr
01/24/2022, 2:53 PMRoss Gerbasi
01/24/2022, 3:58 PMif (!<http://process.env.MY|process.env.MY>_SECRET) throw new Error('Needed that')
always seems to be an issue.thdxr
01/24/2022, 3:59 PMthdxr
01/24/2022, 3:59 PMRoss Gerbasi
01/24/2022, 4:02 PM