-
Notifications
You must be signed in to change notification settings - Fork 217
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
our nextjs app: hot module reloading mysteriously stopped working a few months ago #7067
Comments
NOTE - using pnpm exec next dev is not a workaround, since it doesn't work. |
- see the comment; this fixes it for me, but it's so scary and wrong. - fortunately the hackery should only impact dev mode
Note: We can't robustly do HMR with nextjs and also with the app, and also all the other
|
@williamstein I believe vercel/next.js#58704 should resolve your issues and enable you to handle websocket connections the way you want to. |
Thanks! The comment there "To enable this, the base http server has the on('upgrade') handler removed. In this author's opinion, that handler is an anti-pattern as it makes it much more difficult to handle middleware and other request lifecycle behavior." is something I strongly agree with! Things are working for us know, but it's ugly and there are disturbing messages in the log, so I'm looking forward to trying vercel/next.js#58704 . One major blocker though is that we can't upgrade to nextjs 14 at all, due to #7066, i.e., it seems that something breaks regarding using commonjs instead of ESM modules. Maybe that will get fixed eventually though, as 14.x is pretty new. |
No clue why, but HMR stopped working.
HINT: If you directly run webpack in dev mode
then visit http://localhost:3000, then HMR does work.
So the problem is somehow interaction between the hub express server and nextjs.
The text was updated successfully, but these errors were encountered: