Replies: 1 comment 2 replies
-
Hi, there are multiple solutions that I will explain, choose one or a combination of multiple solutions: Quick fix to
|
Beta Was this translation helpful? Give feedback.
-
Hi, there are multiple solutions that I will explain, choose one or a combination of multiple solutions: Quick fix to
|
Beta Was this translation helpful? Give feedback.
-
Im trying to build my packages seperatly for better debugging but have a little problem getting the .env variables to work defined in the root of the monorepro. Tried this for 1 hour to no avail. What would be the correct way to use .env variables in packages?
my latest attempt is to load inside encryption.sever.ts
the process.env.ENCRYPTION_SECRET is set in the root of the mono repro inside an .env file:
turbo.json is the same as yours almost with:
I tried to
I run:
Then it complains about the value not set
If i hardcode the variable inside the encryption.server.ts it seems to work so somehow it does not load from the .env in the base.
Does anyone how I could resolve this?
On a side note. each application in /apps/myapp1/ would have its own .env but for more easy package building some dummy data in the root .env would be more convient. since else i have to specify manually the .env for each project and they basically hold the same values for encryption for remix-auth and stripe.
Beta Was this translation helpful? Give feedback.
All reactions