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.

HMR stops updating after first error, reports as unaccepted module

See original GitHub issue
  • Operating System: Windows 10
  • Node Version: 10.x
  • NPM Version: 9.6.0
  • webpack Version: 4.35.3
  • mini-css-extract-plugin Version: 0.8.0

Expected Behavior

Given is a Less file styles.less, in which we accidentally introduce an error and then save. HMR attempts an update and it shows the errored compilation.

After fixing the error, HMR should correctly load the fixed compiled CSS.

Actual Behavior

Instead of loading the fixed compiled CSS, HMR reports Ignored an update to unaccepted module ./styles.less and fails to update.

After having received a failed compilation, the module will continue to not accept hot updates until having manually reloaded the web page.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
rjgottencommented, Jul 23, 2019

@evilebottnawi

The testcase is available now as mini-css-extract-plugin-hmr-testcase.

The readme contains a few manual instructions. (Sorry, couldn’t get that to work automated.) It also contains some npm tasks to swap between the package version of mini-css-extract-plugin and the fork that I patched. And it contains a short rundown of what/how/why changes are applied to the forked plugin to make error-recovery/resilience work.

If you want I can also open a PR from the fork.

0reactions
rjgottencommented, Nov 13, 2020

Sorry for big delay, I will look at this tomorrow

No problem. Stuff like this happens. Pretty sure that the like of Webpack 5 puts a lot of work on your plate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignored an update to unaccepted module - Stack Overflow
So, only write a HMR interface in index.js don't work to the second situation and it throws Ignored an update to unaccepted module...
Read more >
Hot Module Replacement - webpack
Hot Module Replacement (or HMR) is one of the most useful features offered by webpack. It allows all kinds of modules to be...
Read more >
A Deep Dive into Hot Module Replacement with Webpack ...
Part 2: Handling Hot Updates with the module.hot API. In the first blog post of the HMR series, we discussed the four stages...
Read more >
Basic Features: Fast Refresh - Next.js
Next.js' Fast Refresh is a new hot reloading experience that gives you instantaneous feedback on edits made to your React components.
Read more >
gaearon/react-hot-loader - Gitter
Haha, good, jumping into Hot Loading is a lot of trial and errors anyway. ... I wanted to get hot module replacement working,...
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