Error: Aborted because ... is not accepted
See original GitHub issueWhen 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
Issue Analytics
- State:
- Created 8 years ago
- Comments:16 (4 by maintainers)
Released as
2.10.0
@glenjamin I will give it a try the soonest, though I am afraid the release will come first since I have a hectic day to deal with.