-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eas update missing --clear-cache option #1123
Comments
You are right that such an option doesn't exist yet, and that this will cause issues when only environment variables are updated, making the bundler think nothing has changed. We are looking into the best solution for this internally, but in the meantime, there is a workaround. You can run Update: as pointed out below, it's |
@kbrandwijk It seems like the command option is actually |
I also ran into this (this is still tagged as need review) and it has actually broken our production envs a few times as well as leaking development and test values into production apps. Even if you log in app.config.ts env-provided values, the dist folder will have still the old data. Even purging the expo export --experimental-bundle --clear whilst this seems to maybe work consistently, doesn't this force an extra build? Or will the |
Same issue as @SleeplessByte, My proposal (from top priority): When using
Thx PS: @SleeplessByte
If you run it with --skip-bundler: |
Thanks @90dy I'll try taht too. For simplicity, if it created a new bundle if |
Is there a short term work around for this issue ? Does only Or I have add this flag |
@pochampagne I don't know if it's 100% correct but this is the workaround we're using: In package.json, we have these scripts:
Then we run |
Thanks @jkk ! is your $TMPDIR any particular folder ? |
@pochampagne it's a global env var on unix-like systems which points to a system temp directory - https://en.wikipedia.org/wiki/TMPDIR |
Awesome thanks for the info ! |
Any update on this? |
For me the problem is with my environment variables. When I'm running my project locally using local servers and I use eas update, the production app starts trying to make requests on localhost... What a mess. |
My current workaround is just to run
|
Thank you for filing this issue! |
I've landed a PR that will add the a |
Thank you @quinlanj! Might make sense for |
Build/Submit details page URL
https://expo.dev/accounts/kavyar-org/projects/kavyar-app/updates/d58a32ad-7c5a-4122-8def-29c85401bb7d
Summary
eas update
seems to be missing a--clear-cache
option.expo publish
had this option andeas build
has it. Not having it is causing problems with our app updates.We are using a STAGE environment variable to auto-configure our app for the appropriate release environment (dev, staging, production). We inject it into the app using eas.json, app.config.js, and the
Constants.manifest2?.extra?.expoClient?.extra?.eas?.STAGE
technique recommended in the docs.This works fine for the initial EAS build. However, when we do
eas update
, the generated bundle will often have a stale value (from a prior build) for the STAGE var that gets injected viaConstants
.We used to use the
--clear
option with expo publish to work around this, but that option is not available foreas update
.This recently caused a staging config to be released into our production app, which created quite a mess.
Managed or bare?
Managed
Environment
Error output
No response
Reproducible demo or steps to reproduce from a blank project
Hopefully the issue is clear enough not to need an isolated reproduction. If a reproduction is required, let me know and I will see if our team has time to create one.
The text was updated successfully, but these errors were encountered: