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.

`hotDownloadManifest` in `JsonpMainTemplate.runtime.js` does not return a promise and causes exception

See original GitHub issue

Do you want to request a feature or report a bug? Report a bug.

What is the current behavior? Hot module reloading doesn’t work.

When hot reloading modules in our React Chrome extension, the HMR runtime invokes hotDownloadManifest in JsonpMainTemplate.runtime.js, which is causing an exception to be thrown.

This begun occurring immediately after upgrading to webpack 2 from v1.13.0.

If the current behavior is a bug, please provide the steps to reproduce. The problem can be summarised as follows:

  1. lib/HotModuleReplacement.runtime.js: hotCheck always expects hotDownloadManifest to accept a timeout parameter and to return a promise.
  2. lib/JsonpMainTemplate.runtime.js: hotDownloadManifest here expects a callback (no timeout) and does not return a promise.

What is the expected behavior? Hot module replacement works as expected.

If this is a feature request, what is motivation or use case for changing the behavior? N/A

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System. node 6.11.0 webpack 3.2.0 Linux 4.8.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

0reactions
miguel-guedescommented, Jul 17, 2017

Ha, that was it! That was definitely the culprit. Thanks for your help, Tobias!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Promise.all() not resolving when running server - Stack Overflow
I'm not going to accept this answer as it's only a workaround; it was just too long to put in the comments... None...
Read more >
How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
webpack @ 4.0.0-beta.3 .. 4.0.0 - Package Diff
can't tell if string will be empty without executing ... + const validReasons = m.reasons.filter(reason => reason.module); ... return Promise.resolve();. }.
Read more >
Output - webpack
Note that not setting a output.library.name will cause all properties returned by the entry point to be assigned to the given object; there...
Read more >
Refactor HMR for runtime modules · 9d91861592 - webpack
lib/web/JsonpMainTemplate.runtime.js ... declare const hotDownloadManifest; ... Wrap deferred object in Promise to mark it as a well-handled Promise to.
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