-
Notifications
You must be signed in to change notification settings - Fork 365
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
V10 dev
breaks React Fast Refresh on Gatsby sites
#4569
Comments
Seeing exact same behavior on Windows/WSL2 since upgrading to v10 of Netlify CLI |
I'm also experiencing this |
Same issue here. |
In the meantime, installing |
Downgrading to |
I believe its because of the new support for Edge Functions in v10, every requests including hot reload related requests are being intercepted and it breaks the hot reload |
Was struggling with this again this week and discovered that I'm using the LTS default for nvm. Apparently 16.16.0 causes this issue as well, not just 17+. Rolled back to 16.14.2 and everything works fine again (with netlify-cli @^9) on my gatsby project |
Thanks for this info. Viewing our sites on port 8000 (rather than functions port 8888) and hot reload works. Of course functions will not. |
Is there any update on this? Not being able to use netlify-cli v10 with Gatsby is quite a bummer. |
Currently, hot-reload is not working for a lot of frameworks which is preventing people from upgrading beyond Related Issue: #4727 I'm not able to make further progress on the issue & thus tagging you here. I've narrowed the bug down to a single function. The error is originating in this PR: #4550 Specifically due to the changes under the proxy event listener for the Lines 333 to 337 in 7a73873
See the diff for the exact changes.
Additionally, the changes in the handler for the Lines 310 to 320 in 7a73873
cc: @danez |
Can confirm this is an issue with Nuxt apps as well. netlify-cli v10+ fails to hot reload on functions port 8888 even when underlying nuxt dev server is hot reloading fine. |
I'll be looking into this. Thanks a lot @tinfoil-knight for researching this so thoroughly, this helps tremendously! My suspicion is that the buffering happening in Line 383 in 1ab07f0
I'll see how we can get this fixed. |
Verified that HMR is working using |
Describe the bug
Since version 10, using
netlify-cli
in a Gatsby project and serving the site indevelop
mode locally usingnetlify dev
seems to break React Fast Refresh/hot reloading in the browser. Hot reloading still works fine when browsing the site via the underlying Gatsby dev server instead ofnetlify-cli
's.Expected behavior
Making a change to a React component in the source code automatically updates the rendered markup on the website in local
develop
mode, thanks to React Fast Refresh/hot reloading.Observed behavior
When accessing the local
develop
site vianetlify-cli
's dev server (i.e., vialocalhost:8888
rather thanlocalhost:8000
) hot reloading does not work at all.Steps to reproduce
npm install
.npm start
to start thenetlify-cli
dev server.src/pages/index.js
.http://localhost:8000
(the underlying Gatsby dev server).netlify-cli@^9
.http://localhost:8888
(thenetlify-cli
dev server).Configuration
Bug is demonstrable with zero config.
Environment
The text was updated successfully, but these errors were encountered: