jss
jss copied to clipboard
HMR is not working
Describe the Bug
Hot Module Reloading described here https://nextjs.org/docs/app/api-reference/next-cli#development is not working
Console logs repeatedly: WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr' failed:
Also the whole window refreshes itself every minute or so.
To Reproduce
-
npx create-sitecore-jss nextjs,nextjs-sxa,nextjs-multisite,nextjs-xmcloud
-
npm run start:connected
Expected Behavior
No console logs about websocket.ts:77 WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr' failed:
and hmr is working when you edit a component and save.
Possible Fix
No response
Provide environment information
- Sitecore Version: XM Cloud
- JSS Version: 22.0.0
- Browser Name and version: Chrome latest
- Operating System and version (desktop or mobile): Windows 11
- Link to your project (if available): n/a