-
Notifications
You must be signed in to change notification settings - Fork 757
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
🐛 BUG: Infinite building with --x-dev-env and an app with a build #6876
Comments
Taking a look now cc @penalosa |
Got a fix going here #6881 Notably, you'll also need to set |
We'll need that even when your PR is merged? |
Yeah fixing the bug made me think I broke something else. But the default [build]
command = "npm run build"
+ watch_dir = "./app" |
@RamIdeas That seems like a bug too, since that file is included in the worker bundle and should trigger a worker reload anyway, even without setting watch_dir. Does this problem exist even without --x-dev-env? |
@zwily looking at youre repo, why are you calling |
Honestly, just because that’s the way the remix workers template has always been. The double builds have always bothered me.
|
@RamIdeas Does this problem exist even without --x-dev-env? |
The e2e test runs with the flag disabled and enabled which confirms it does not. The bug was caused by explicitly retriggering the whole flow in –x-dev-env so makes sense it did not appear in the old flow |
I should clarify. We shouldn't have to put |
I think I know what you mean. If this works in the old flow, can you explain how? From my understanding, the wranger.toml has |
|
But |
Here remix is running in manual mode |
My question, setting watch_dir = ./app shouldn't be required in this usecase, so is it so even with --x-dev-env / after your fix? |
Yeah good catch. watch_dir is not required if using |
ok dope, thank you very much for clarifying! I think we need to fix the template and remove |
I must be doing something wrong because this is still infinite building with 3.80.0 on this app: https://github.com/zwily/remix-wrangler-much-restarting I updated it for wrangler 3.80.0, removed the custom build and watch dir, and now when I
|
Also, I just pushed an update to it that makes it match my proposed update for the official remix template |
There's an ongoing issue with multiple reloads with the new x-dev-env, so we're turning it off for now: cloudflare/workers-sdk#6876
There's an ongoing issue with multiple reloads with the new x-dev-env, so we're turning it off for now: cloudflare/workers-sdk#6876
I've noticed another issue too, which I suspect is unrelated, but similar. Using the same sample repo (but adding --no-x-dev-env to avoid the infinite reloading), do
On the 10th save:
This has been happening for awhile and I've gotten used to just restarting the process periodically, but can you think of what might be causing this? Should I open a new ticket? Possible it's remix's fault? Or maybe this is fixed in the new dev env? |
I can confirm that infinite reloads happen with --x-dev-env on, and doesn't without, on a standard remix app (I'm using https://github.com/threepointone/remix-workers-app) |
This fix seems to work. And my last comment about the server reloads increasing every time a file is saved also seems to be addressed in Thank you! |
There's an ongoing issue with multiple reloads with the new x-dev-env, so we're turning it off for now: cloudflare/workers-sdk#6876
Which Cloudflare product(s) does this pertain to?
Wrangler
What version(s) of the tool(s) are you using?
3.79.0 [Wrangler]
What version of Node are you using?
20
What operating system and version are you using?
Man Sequoia
Describe the Bug
Observed behavior
When I have a build process (remix, in this case), static assets on, and use
wrangler dev --x-dev-env
, wrangler gets into an infinite loop of rebuilding my app.Clone github.com:zwily/remix-wrangler-much-restarting and run
npm i && npm run dev
. I also tested this with wrangler HEAD, which includes--x-dev-env
on by default, and it still happens.If I comment out
build.command
fromwrangler.toml
it doesn't happen. Should I just make sure I always build before deploy and remove that line?Please provide a link to a minimal reproduction
https://github.com/zwily/remix-wrangler-much-restarting
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: