Skip to content

HMR -- can't find hot-update.json. #4310

@Kyle-Mendes

Description

@Kyle-Mendes
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

using:

  • zeit/next-sass for my next.config.js
  • a custom server.js with a custom directory
    • const application = next({ dev, dir: './src' });
  • Flow js for type checking
  • Redux and Apollo

I have just updated to next 6.0.0 and I can't use my site because the HMR fails to find any information, causing any route requests to result in a full reload.

The site works when loaded with yarn build && yarn start

Folder structures:

./src
  /pages
    /apps
      /Public
        index.js
        sign_in.js
        sign_up.js
        forgot_password.js
      /Admin
        .......

EDIT:

It seems like the files are supposed to go directly into .next I see that happening in a small test repo that I made. However, it now seems that if that's the case, the error I'm encountering is actually the fact that the HMR is unable to find the hot-update.json files when updates are made.

END EDIT


When on page /apps/Public/sign_in as /sign_in I click on <Link to="/apps/Public/forgot_password" as="forgot_password" />

Result:

image

Initial page loads of all pages works perfectly. However, any route changes fail.

Debugging

I have tried just about everything I can think of. It seems like this error is caused from my ./src/.next file not having a /webpack directory. My understanding is that HMR will look for the hot-update.json files in /webpack

However, in my case, all hot-update.json files are in ./src/.next

image

Contents of ./src/.next

image

Questions:

  • Why do I not have a /webpack directory?
  • I can't create a reproduction repo, can someone from Zeit help by looking through my private repo?

Your Environment

Tech Version
next 6.0
node 9.11.1
OS Mac OS
browser Chrome

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