webpack-hot-middleware: Error: Aborted because ... is not accepted

When trying to hot-update React components with webpack-hot-middleware, I receive the following error every time:

Uncaught (in promise) Error: Aborted because ./SomeComponent.js is not accepted

I’m not exactly sure why that happens… But I’ve noticed that:

I can hot-update anything else (manually replacing my redux-reducer using module.hot.accept, reload css using style-loader, etc.).

Stepping through with the debugger, I can see that in file process-update.js line 32, The callback function given to module.hot.check is never called. It seems the hotCheck() function assigns its apply parameter (the callback) to a global hotApplyOnUpdate. This function is then given to hotApply() which expects to receive an options object, and not a callback.

Searching for all usages of hotApplyOnUpdate yields:

  • Initially defined as true;
  • Assigned to be the given apply parameter every time hotCheck() is called.
  • Given as an argument to hotApply() inside hotUpdateDownloaded().

So, is it a problem with webpack’s HMR plugin?


I’m using:

webpack@2.0.5-beta
webpack-dev-middleware@1.5.1
webpack-hot-middleware@2.6.4

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Released as 2.10.0