Hello, this is starting to drive me crazy, is there something I don't understand?
I have environment variables, in vite dev I can access them normally via process.env
When I build (nitroV2 with the AWS amplify preset) and start the app (locally or deployed) the variables are undefined.
Locally, they are set in the .env file, and they are formatted like ADMIN_COOKIE="xxx"
It's secret variables used in server context, i've tried multiple way, each of them works in dev mode
- Getting them outside my serverFN in the same ts file
- Getting them inside each function
- Using node:process (and process solo)
- Creating a ServerOnlyFn to get them, and using this func on my serverFn
the console.log inside each func (serverOnlyfn>serverFN>clientUsage) show the variable in dev mode at each points, but not in builded env.
On aws i set these variables, they are displayed in undefined too.
I have exhausted all my ideas at this point