{"action":"created","issue":{"url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware/issues/70","repository_url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware","labels_url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware/issues/70/comments","events_url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware/issues/70/events","html_url":"https://github.com/glenjamin/webpack-hot-middleware/issues/70","id":131876998,"number":70,"title":"Error: Aborted because ... is not accepted","user":{"login":"sosz","id":13297197,"avatar_url":"https://avatars.githubusercontent.com/u/13297197?v=3","gravatar_id":"","url":"https://api.github.com/users/sosz","html_url":"https://github.com/sosz","followers_url":"https://api.github.com/users/sosz/followers","following_url":"https://api.github.com/users/sosz/following{/other_user}","gists_url":"https://api.github.com/users/sosz/gists{/gist_id}","starred_url":"https://api.github.com/users/sosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sosz/subscriptions","organizations_url":"https://api.github.com/users/sosz/orgs","repos_url":"https://api.github.com/users/sosz/repos","events_url":"https://api.github.com/users/sosz/events{/privacy}","received_events_url":"https://api.github.com/users/sosz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware/labels/help-wanted","name":"help-wanted","color":"5319e7"},{"url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware/labels/webpack2","name":"webpack2","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-06T17:14:39Z","updated_at":"2016-03-08T23:15:14Z","closed_at":null,"body":"When trying to hot-update React components with webpack-hot-middleware, I receive the following error every time:\r\n```\r\nUncaught (in promise) Error: Aborted because ./SomeComponent.js is not accepted\r\n```\r\n\r\nI'm not exactly sure why that happens... But I've noticed that:\r\n\r\nI can hot-update anything else (manually replacing my redux-reducer using `module.hot.accept`, reload css using style-loader, etc.).\r\n\r\nStepping through with the debugger, I can see that in file [`process-update.js` line 32](https://github.com/glenjamin/webpack-hot-middleware/blob/master/process-update.js#L32), 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.\r\n\r\nSearching for all usages of `hotApplyOnUpdate` yields:\r\n- Initially defined as `true`;\r\n- Assigned to be the given `apply` parameter every time `hotCheck()` is called.\r\n- Given as an argument to `hotApply()` inside `hotUpdateDownloaded()`.\r\n\r\nSo, is it a problem with webpack's HMR plugin?\r\n\r\n---\r\n\r\nI'm using:\r\n```\r\nwebpack@2.0.5-beta\r\nwebpack-dev-middleware@1.5.1\r\nwebpack-hot-middleware@2.6.4\r\n```"},"comment":{"url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware/issues/comments/194012782","html_url":"https://github.com/glenjamin/webpack-hot-middleware/issues/70#issuecomment-194012782","issue_url":"https://api.github.com/repos/glenjamin/webpack-hot-middleware/issues/70","id":194012782,"user":{"login":"rmarscher","id":352937,"avatar_url":"https://avatars.githubusercontent.com/u/352937?v=3","gravatar_id":"","url":"https://api.github.com/users/rmarscher","html_url":"https://github.com/rmarscher","followers_url":"https://api.github.com/users/rmarscher/followers","following_url":"https://api.github.com/users/rmarscher/following{/other_user}","gists_url":"https://api.github.com/users/rmarscher/gists{/gist_id}","starred_url":"https://api.github.com/users/rmarscher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmarscher/subscriptions","organizations_url":"https://api.github.com/users/rmarscher/orgs","repos_url":"https://api.github.com/users/rmarscher/repos","events_url":"https://api.github.com/users/rmarscher/events{/privacy}","received_events_url":"https://api.github.com/users/rmarscher/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T23:15:13Z","updated_at":"2016-03-08T23:15:13Z","body":"As @sosz uncovered, the signature for module.hot.check has changed in webpack 2 to using promises instead of a callback. The new version of `only-dev-server.js` uses `then()` and `catch()` instead of a callback. I think it's possible to support both the webpack 1 callback and the webpack 2 promise. I submitted pull request #85. Hope that helps."}}