Hi, I’ve an issue with building my application thru eas build.
I’ve defined the .env
with the 2 variables to determine the API URL for different environments. This was included in the previous eas builds and ignored the environment variables that I have defined in the eas.json
. Then only did I realize it and add the .env
ignore into .easignore
.
.env
EXPO_PUBLIC_ID_URL=bmj…
EXPO_PUBLIC_API_URL=bmj…
eas.json
{
“cli”: {
“version”: “>= 3.16.0”,
“appVersionSource”: “remote”
},
“build”: {
“development”: {
“autoIncrement”: true,
“developmentClient”: true,
“distribution”: “internal”,
“channel”: “development”,
“env”: {
“EXPO_PUBLIC_ID_URL”: “bmj…”,
“EXPO_PUBLIC_API_URL”: “bmj…”
}
},
“preview”: {
“autoIncrement”: true,
“distribution”: “internal”,
“channel”: “preview”,
“env”: {
“EXPO_PUBLIC_ID_URL”: “uat…”,
“EXPO_PUBLIC_API_URL”: “uat…”
}
},
“production”: {
“autoIncrement”: true,
“distribution”: “internal”,
“channel”: “production”,
“env”: {
“EXPO_PUBLIC_ID_URL”: “id…”,
“EXPO_PUBLIC_API_URL”: “api…”
}
}
},
“submit”: {
“production”: {}
}
}
However, the build process still shows the previous value in the .env
when I have already run for preview
profile, with the command eas build --platform android --profile preview --clear-cache
. This has caused me unable call the API URL in the preview build by eas build.
Application build is still showing old value