[dev mode bug: 8.0.0-canary.10-17] Uncaught ReferenceError: webpackHotUpdate is not defined
See original GitHub issueBug report
Describe the bug
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.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Clone my repo:
git clone https://github.com/4cm4k1/personal-website
- In your terminal, use
yarn
command to install dependencies:yarn
- Use
package.json
script to start dev mode:yarn dev
- Open Chrome to app (macOS):
open http://localhost:3000
- Open Chrome DevTools (macOS): <kbd>⌘</kbd>+<kbd>option</kbd>+<kbd>i</kbd>
- Observe the errors in the Console tab (screenshot below).
Expected behavior
I expected dev mode with hot reloading to work without console errors.
Screenshots
When using yarn dev
:
When using
yarn dev:proxy
:
System information
- OS: macOS 10.14.4
- Browser: Chrome 73.0.3679.0
- Version of Next.js: 8.0.0-canary.10 - 8.0.0-canary.17
Additional context
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).
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
@4cm4k1 I get the same error. How do you solve it?
@Clebal Thank you for this info. I’m going to look into it more and file an issue over in that repo!