[Bug]: Hot Reload not working with Cloudflare Pages
See original GitHub issueWhat version of Remix are you using?
^1.1.1
What version of Node are you using? Minimum supported version is 14.
v17.0.1
Steps to Reproduce
npx create-remix@latest
# choose Cloudflare Pages
cd [whatever you named the project]
npm run dev
- Edit the file
app/routes/index.jsx
- Observe the
File changed
log in your console as well as the related logs - Observe that http://127.0.0.1:8788/ has not changed
- Refresh the page
- Observe that http://127.0.0.1:8788/ has not changed
- Ctrl+C to stop the npm script
- run
npm run dev
again - Observe that the edit to
app/routes/index.jsx
is now present - edit the file again
- observe that the change are still not present
Expected Behavior
We’d expect the changes to be immediately apparent
Actual Behavior
The changes are not visible until the process has be stopped and restarted using the npm run dev
command
Issue Analytics
- State:
- Created 2 years ago
- Reactions:22
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Known issues · Cloudflare Pages docs
Known issues. Here are some known bugs and issues with Cloudflare Pages: Builds and deployment. GitHub and GitLab are currently the only ......
Read more >New updates 1.1.6 has a bug (Continuously Refresh Webpages)
Any page I visit on my website it reloads continuously and don't stop reload. ... latest wordpress… running cloudflare plugin cause unstopable refresh…...
Read more >Running a Next.js Site on Cloudflare Pages - Opstrace
Error : Image Optimization using Next.js' default loader is not compatible with `next export`. Possible solutions: - Use `next start` ...
Read more >Newest 'cloudflare-pages' Questions - Stack Overflow
I am trying to read a KV from React App, but it won't work I've created a binding and if I try env.Name,...
Read more >Fix Cloudflare Remix HMR Bug with patch-package - Justin Noel
This means Hot Module Reloading(HMR) doesn't work at all. So, it's a pretty painful developer experience having to stop and restart the dev ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For me, the browser needs to refresh twice in order to see updates.
So each hot reload shows the second-most-recent update, not the one I just made.
This is pretty annoying for my workflow. 😦
I started another project with Remix + Cloudflare Pages about 8 weeks ago and I remember noticing that one of the version upgrades I made caused this to start happening. I don’t really know enough about what’s going on to say if this might be an issue with
wrangler
also/instead.Edit:
I have an app with the following versions where the live reload works:
If you haven’t seen it, checkout this comment where you can now install
wangler@pages
and hot reloading should work. It doesn’t seem like other attached issues have been updated… but for now, installing the pages package enables hot reloading for me.I believe the
create-remix
CLI has thewrangler
package set atalpha
… so just update it topages
and things should start working.