remix: HMR not working in `cloudflare-pages` template
What version of Remix are you using?
1.16.1
Are all your remix dependencies & dev-dependencies using the same version?
- Yes
Steps to Reproduce
npx create-remix@latest --template https://github.com/remix-run/remix/tree/templates_v2_dev/templates/cloudflare-pagesnpm run dev- change something in the
/app/routes/_index.tsxfile - open console and see:
Expected Behavior
HMR should work after changing the file
Actual Behavior
After changing the file, HMR does not work, and an error appears in the console, the changes can only be seen if you manually reload the page. Perhaps this is due to the race condition #6286
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 23 (14 by maintainers)
It works great for me with Wrangler v3.
@Jackardios I got this too after upgrading to v3. I had to update my
wranger.tomlto removestreams_enable_constructorsfrom thecompatibility_flagsbecause above that error you mentioned I got this:The compatibility flag streams_enable_constructors became the default as of 2022-11-30I had the same issue (HMR not working) with Cloudflare workers, remix 1.19.3, and wrangler 3.7.0. The thing that resolved it for me was updating my
remix.config.jswith:Following this template: https://github.com/remix-run/remix/blob/main/templates/cloudflare-workers/remix.config.js
If you can share a reproduction, I’d be happy to look at it!
On Sat, Jul 22, 2023 at 07:56 Aaron Adams @.***> wrote:
@huw I am using wrangler v2. Did you manage to use version 3 with the remix? I am getting a strange error with it when I try to start the dev server:
[ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.(but there is no additional information above)@pcattori it looks like it really is due to a race condition. If you set timeout to logDevReady no error occurs: