question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[dev mode bug: 8.0.0-canary.10-17] Uncaught ReferenceError: webpackHotUpdate is not defined

See original GitHub issue

Bug 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:

  1. Clone my repo: git clone https://github.com/4cm4k1/personal-website
  2. In your terminal, use yarn command to install dependencies: yarn
  3. Use package.json script to start dev mode: yarn dev
  4. Open Chrome to app (macOS): open http://localhost:3000
  5. Open Chrome DevTools (macOS): <kbd>⌘</kbd>+<kbd>option</kbd>+<kbd>i</kbd>
  6. 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: screen shot 2019-01-28 at 16 47 01 When using yarn dev:proxy: screen shot 2019-01-28 at 16 45 58

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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
raymondszecommented, Feb 22, 2019

@4cm4k1 I get the same error. How do you solve it?

1reaction
4cm4k1commented, Jan 30, 2019

@Clebal Thank you for this info. I’m going to look into it more and file an issue over in that repo!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[dev mode bug: 8.0.0-canary.10-17] Uncaught ReferenceError ...
... running a Next app in dev mode results in an Uncaught ReferenceError: webpackHotUpdate is not defined error in the console, pointin...
Read more >
WebpackHotUpdate not defined Angular 2+ - Stack Overflow
This looks like a problem in the way Visual Studio 2017 performs the HMR (Hot Module Replacement) process. There are two options i...
Read more >
uncaught referenceerror: $ is not defined webpack - You.com
Try to use frontend-compatible modules whenever possible. It's possible to manually add a polyfill for a node.js core module. An error message will...
Read more >
Uncaught ReferenceError: $ is not defined\ JavaScript error
WebPack runs without errors, builds the project, and runs it via the WebPack Dev Server. The page loads with the correct styles and...
Read more >
Webpack HMR breaks after manual refresh - Roots Discourse
The bud build command works fine, however when I run bud dev I get the ... Uncaught ReferenceError: webpackHotUpdate is not defined ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found