Skip to content

Hot reload not working with npm run dev #267

@qwertzguy

Description

@qwertzguy

When I edit a file whether root.tsx or routes/_index.tsx, I see the server log correctly rebuilding and triggering hmr with no errors, but in the browser console, I see the following and the change doesn't get reflected:

[remix] file changed: app/root.tsx
21:45:48.047 (index):41 [remix] rebuilt (798ms)
21:45:48.207 (index):57 [HMR] Component changed [app/root.tsx]
21:45:48.257 (index):62 
        
        
       GET http://localhost:3000/build/root-N3MPC6QC.js?t=1725425141512 net::ERR_EMPTY_RESPONSE
ws.onmessage @ (index):62
21:45:48.257 (index):87 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:3000/build/root-N3MPC6QC.js?t=1725425141512

Here's what I see on the server side in my terminal:

Rebuilding...

Done in 205ms.
 info  rebuilt (798ms)
 info  app server ready (171ms)
 info  hmr

[remix-serve] http://localhost:3000 (http://<my-ip>:3000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions