I'm building a app on react-native with Expo. I created a .env file with my variables. The problemas is that when I run npx expo run:android the process.env type definition change and the only available var is NODE_ENV, so I get the error Property 'EXPO_PUBLIC_ANDROID_FIREBASE_CLIENT_ID' does not exist on type 'typeof env'., as you can see in the image the type definition if from android folder:
enter image description here
When I delete the android folder the type definition return to nomrally and every process.env.MY_VAR_ENV is defined as string | undefined
I tried creating a process-env.d.ts file but when I added to tscongi.json other import are borken, the file are utils or type definitions with Zod (also i tried adding the folder in tsconfig.json without success.
enter image description here
I tried creating a process-env.d.ts file but when I added to tscongi.json other import are borken, the file are utils or type definitions with Zod (also i tried adding the folder in tsconfig.json without success.
You can add the exclude key to the tsconfig.json, like this:
"exclude": ["android", "ios"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With