Beginning with 8.0.0-canary.10 (I think?) through the current canary version, running a Next app in dev mode results in an Uncaught ReferenceError: webpackHotUpdate is not defined error in the console, pointing to line 1 of _next/static/webpack/static/runtime/main.js.[hash].hot-update.js. This causes the page to refresh every few seconds, which makes development with hot reloading nearly impossible.
Importantly, this does not affect Next at all in production and/or serverless mode.
Steps to reproduce the behavior, please provide code snippets or a repository:
git clone https://github.com/4cm4k1/personal-websiteyarn command to install dependencies: yarnpackage.json script to start dev mode: yarn devopen http://localhost:3000I expected dev mode with hot reloading to work without console errors.
When using yarn dev:

When using yarn dev:proxy:

Also, I use yarn dev:proxy to develop in dev mode with an HTTPS proxy. The error occurs there, too, along with other errors that may be caused by the first one. I’ve attached a screenshot for that as well. If it needs to be tested, you need to install mkcert (brew install mkcert), run yarn gen-dev-certs (this uses mkcert to generate valid SSL certificates for localhost, 127.0.0.1, and ::1), and then you can run yarn dev:proxy (this runs yarn dev and yarn proxy simultaneously).
I've got the same error but in Next.js 7.0.2. I'm not sure that this error is from Next.js, I think it's from next-offline because I've observed that the error disappears if you remove it from next.config.js.
@Clebal Thank you for this info. I’m going to look into it more and file an issue over in that repo!
Closed because this issue pertains to the aforementioned plugin.
@4cm4k1 I get the same error. How do you solve it?
I've checked that indeed when you remove next-offline the error disappears . Then I went to check on the code source for the webpapck plugin of next-offline and seems like they're using an async hook where it should be synchronous...
```
const generateNextManifest = require('./next-manifest');
module.exports = class InlineNextPrecacheManifestPlugin {
constructor(opts) {
this.opts = opts;
}
apply(compiler) {
const errorhandler = err => {
throw new Error(Precached failed: ${err.toString()});
};
if (compiler.hooks) {
compiler.hooks.done.tap(
'CopyPlugin',
async() => generateNextManifest(this.opts), // !!!!here!!!!
errorhandler
);
} else {
compiler.plugin(
'done',
async() => generateNextManifest(this.opts),
errorhandler
);
}
}
};
`
``
Updating next-offline to 3.3.7 seems to have solved it for me.
@themao is correct.
Most helpful comment
@4cm4k1 I get the same error. How do you solve it?