HMR not working
See original GitHub issueHi,
I’m doing SSR with HMR, when trying to change lazy loaded component, the HMR works on client side, but when I tried to refresh the page, the console is showing these errors:
loadable-components.es.js:93 Uncaught Error: loadable-components: module "./NotFoundPage-1" is not found, client and server modules are not sync. You are probably not using the same resolver on server and client.
at loadable-components.es.js:93
at Array.map (<anonymous>)
at loadState (loadable-components.es.js:87)
at loadComponents (loadable-components.es.js:118)
at Object.<anonymous> (client.js:25)
at Object../src/renderer/client.js (app.js:1413)
at __webpack_require__ (bootstrap:772)
at fn (bootstrap:141)
at Object.0 (app.js:1982)
at __webpack_require__ (bootstrap:772)
How to Reproduce:
- Clone https://github.com/antonybudianto/react-ssr-starter
- npm i
- npm start
- Visit random 404 route (e.g http://localhost:3000/asdasd)
- Change
src/routes/NotFoundPage/NotFoundPage.js
- This route is lazy loaded
- Notice the hot reload should work
- Refresh the page
- Error shown
Any pointers will be helpful, thank you!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:16 (6 by maintainers)
Top Results From Across the Web
HMR not working on webpack 5.66.0 · Issue #15206 - GitHub
Hot module reloading is not working after updating webpack to v5.66.0. If the current behavior is a bug, please provide the steps to...
Read more >webpack hot module replacement not working - Stack Overflow
it tries to update with HMR before trying to reload the whole page. So, presumably, if that fails, it will just reload the...
Read more >Hot Module Replacement - webpack
Hot Module Replacement (HMR) exchanges, adds, or removes modules while an application is running, without a full reload. This can significantly speed up ......
Read more >Hot Module Replacement - SurviveJS
Doing this pushes the problem to the application side. Enabling HMR#. The following steps need to be enabled for HMR to work: The...
Read more >Hot Module Replacement (HMR) - Snowpack
hmr configuration option. Enable HMR: Custom Server#. Note: Full HMR is not yet supported. Only full page reloads are currently working. Follow updates...
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 FreeTop 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
Top GitHub Comments
My current workaround is:
The idea is to remove the ending dash with index (“./NotFoundPage-1” -> “./NotFoundPage”), and error is gone 😄
Have the same issue 😦