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 timehotCheck()
is called. - Given as an argument to
hotApply()
insidehotUpdateDownloaded()
.
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
- Merge pull request #85 from rmarscher/hotCheck-webpack-2-support-#70 Support for webpack 2 module.hot.check promise — committed to webpack-contrib/webpack-hot-middleware by glenjamin 8 years ago
- Merge pull request #86 from rmarscher/hotCheck-webpack-2-support-#70 Handling webpack 2 promise version of module.hot.apply — committed to webpack-contrib/webpack-hot-middleware by glenjamin 8 years ago
Released as
2.10.0