-
Notifications
You must be signed in to change notification settings - Fork 479
EAS Update not detecting .env files for different environments #4765
Comments
I am also struggling with this issue. Eas build uses eas.json to create the env variables but for eas updates I can't seem to get it to use env.staging or env.development. It just defaults to whats in env.production. |
@onkardeol Have you tried adding |
Hi all! The In
We still need a better story about how these two mechanisms relate; feel free to open suggestions on our docs at github.com/expo/expo if you have a good idea. For now I'll close this issue as this repository will be archived soon. Hope this helps! |
@byCedric Looks like secrets are not loading when i use then on preview i tried
This is all there is |
Oh. I did not see issue wa closed. opening new one |
Summary
I am attempting to setup my app to utilize EXPO_PUBLIC environment variables with EAS Update.
https://docs.expo.dev/eas-update/environment-variables/
My eas.json:
I have 3 environment files:
Each of these env files contains 1 environment variable EXPO_PUBLIC_API_URL which is the url of my api.
The Problem
When i run the app locally using
yarn expo start
My console outputs
env: load .env.development env: export EXPO_PUBLIC_API_URL
which is correct.
HOWEVER, when I run
eas update --channel staging
My console outputs
✔ Provide an update message: … stable [expo-cli] env: load .env.production [expo-cli] env: export EXPO_PUBLIC_API_URL
I have tried messing around with the config files. I've scoured the docs multiple times with no results. I am expecting eas to use the .env.staging config when i run
eas update --channel staging
Environment
Please specify your device/emulator/simulator platform, model and version
iPhone 13 Pro Max
Error output
No response
Reproducible demo or steps to reproduce from a blank project
Starting a project with the above-mentioned .env setup and eas.json setup should reproduce the issue
The text was updated successfully, but these errors were encountered: