{"action":"created","issue":{"url":"https://api.github.com/repos/deepsweet/autopolyfiller-loader/issues/12","labels_url":"https://api.github.com/repos/deepsweet/autopolyfiller-loader/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/deepsweet/autopolyfiller-loader/issues/12/comments","events_url":"https://api.github.com/repos/deepsweet/autopolyfiller-loader/issues/12/events","html_url":"https://github.com/deepsweet/autopolyfiller-loader/issues/12","id":99905350,"number":12,"title":"Module Build Error","user":{"login":"saulshanabrook","id":1186124,"avatar_url":"https://avatars.githubusercontent.com/u/1186124?v=3","gravatar_id":"","url":"https://api.github.com/users/saulshanabrook","html_url":"https://github.com/saulshanabrook","followers_url":"https://api.github.com/users/saulshanabrook/followers","following_url":"https://api.github.com/users/saulshanabrook/following{/other_user}","gists_url":"https://api.github.com/users/saulshanabrook/gists{/gist_id}","starred_url":"https://api.github.com/users/saulshanabrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saulshanabrook/subscriptions","organizations_url":"https://api.github.com/users/saulshanabrook/orgs","repos_url":"https://api.github.com/users/saulshanabrook/repos","events_url":"https://api.github.com/users/saulshanabrook/events{/privacy}","received_events_url":"https://api.github.com/users/saulshanabrook/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-09T15:21:38Z","updated_at":"2015-08-09T15:41:47Z","closed_at":null,"body":"I have just installed and set up this loader, and when I try to build I get an error:\r\n\r\n```bash\r\n$ npm run dev-server                                                                                                                                                                                                             ≣≣≣≣≣≣≣≣≣  ≣\r\n\r\n> caido@0.1.0 dev-server /Users/saul/projects/go/src/github.com/lucibus/lucibus/caido\r\n> env WEBPACK_DEV_SERVER=true WEBPACK_DEVTOOL=eval-source-map WEBPACK_DEBUG=true webpack-dev-server --colors --progress --hot\r\n\r\n 70% 1/1 build moduleshttp://0.0.0.0:8080/\r\nwebpack result is served from /\r\ncontent is served from /Users/saul/projects/go/src/github.com/lucibus/lucibus/caido\r\nHash: 62701bec273b5fb3fb07\r\nVersion: webpack 1.11.0\r\nTime: 4431ms\r\nchunk    {0} main.js (main) 173 kB [rendered]\r\n    [0] multi main 52 bytes {0} [built] [1 error]\r\n  [157] ./~/webpack-dev-server/client?http://0.0.0.0:8080 1.82 kB {0} [built]\r\n  [158] ./~/webpack-dev-server/~/socket.io-client/index.js 37 bytes {0} [built]\r\n  [159] ./~/webpack-dev-server/~/socket.io-client/lib/index.js 1.5 kB {0} [built]\r\n  [160] ./~/webpack-dev-server/~/socket.io-client/lib/url.js 1.53 kB {0} [built]\r\n  [161] ./~/webpack-dev-server/~/socket.io-client/~/parseuri/index.js 690 bytes {0} [built]\r\n  [162] ./~/webpack-dev-server/~/socket.io-client/~/debug/debug.js 2.46 kB {0} [built]\r\n  [163] ./~/webpack-dev-server/~/socket.io-client/~/socket.io-parser/index.js 7.63 kB {0} [built]\r\n  [164] ./~/webpack-dev-server/~/socket.io-client/~/socket.io-parser/~/json3/lib/json3.js 40.1 kB {0} [built]\r\n  [165] (webpack)/buildin/amd-options.js 43 bytes {0} [built]\r\n  [166] ./~/webpack-dev-server/~/socket.io-client/~/socket.io-parser/~/isarray/index.js 120 bytes {0} [built]\r\n  [167] ./~/webpack-dev-server/~/socket.io-client/~/component-emitter/index.js 3 kB {0} [built]\r\n  [168] ./~/webpack-dev-server/~/socket.io-client/~/socket.io-parser/binary.js 3.84 kB {0} [built]\r\n  [169] ./~/webpack-dev-server/~/socket.io-client/~/socket.io-parser/is-buffer.js 252 bytes {0} [built]\r\n  [170] ./~/webpack-dev-server/~/socket.io-client/lib/manager.js 11 kB {0} [built]\r\n  [171] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/index.js 38 bytes {0} [built]\r\n  [172] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/lib/index.js 140 bytes {0} [built]\r\n  [173] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/lib/socket.js 16.9 kB {0} [built]\r\n  [174] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/lib/transports/index.js 1.08 kB {0} [built]\r\n  [175] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/lib/xmlhttprequest.js 1.16 kB {0} [built]\r\n  [176] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/has-cors/index.js 458 bytes {0} [built]\r\n  [177] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/has-cors/~/global/index.js 257 bytes {0} [built]\r\n  [178] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/lib/transports/polling-xhr.js 7.92 kB {0} [built]\r\n  [179] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/lib/transports/polling.js 4.85 kB {0} [built]\r\n  [180] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/lib/transport.js 2.74 kB {0} [built]\r\n  [181] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/engine.io-parser/lib/browser.js 14.4 kB {0} [built]\r\n  [182] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/engine.io-parser/lib/keys.js 297 bytes {0} [built]\r\n  [183] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/engine.io-parser/~/has-binary/index.js 1.06 kB {0} [built]\r\n  [184] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/engine.io-parser/~/has-binary/~/isarray/index.js 120 bytes {0} [built]\r\n  [185] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/engine.io-parser/~/arraybuffer.slice/index.js 725 bytes {0} [built]\r\n  [186] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/engine.io-parser/~/base64-arraybuffer/lib/base64-arraybuffer.js 1.7 kB {0} [built]\r\n  [187] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/engine.io-parser/~/after/index.js 685 bytes {0} [built]\r\n  [188] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/engine.io-parser/~/utf8/utf8.js 6.22 kB {0} [built]\r\n  [189] (webpack)/buildin/module.js 251 bytes {0} [built]\r\n  [190] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/engine.io-parser/~/blob/index.js 973 bytes {0} [built]\r\n  [191] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/parseqs/index.js 708 bytes {0} [built]\r\n  [192] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/component-inherit/index.js 146 bytes {0} [built]\r\n  [193] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/debug/browser.js 3.28 kB {0} [built]\r\n  [194] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/debug/debug.js 4.1 kB {0} [built]\r\n  [195] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/debug/~/ms/index.js 2.02 kB {0} [built]\r\n  [196] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/lib/transports/polling-jsonp.js 4.82 kB {0} [built]\r\n  [197] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/lib/transports/websocket.js 4.57 kB {0} [built]\r\n  [198] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/browser.js 831 bytes {0} [built]\r\n  [199] ./~/webpack-dev-server/~/socket.io-client/~/indexof/index.js 199 bytes {0} [built]\r\n  [200] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/parseuri/index.js 1.19 kB {0} [built]\r\n  [201] ./~/webpack-dev-server/~/socket.io-client/~/engine.io-client/~/parsejson/index.js 842 bytes {0} [built]\r\n  [202] ./~/webpack-dev-server/~/socket.io-client/lib/socket.js 6.99 kB {0} [built]\r\n  [203] ./~/webpack-dev-server/~/socket.io-client/~/to-array/index.js 216 bytes {0} [built]\r\n  [204] ./~/webpack-dev-server/~/socket.io-client/lib/on.js 370 bytes {0} [built]\r\n  [205] ./~/webpack-dev-server/~/socket.io-client/~/component-bind/index.js 474 bytes {0} [built]\r\n  [206] ./~/webpack-dev-server/~/socket.io-client/~/has-binary/index.js 1.08 kB {0} [built]\r\n  [207] ./~/webpack-dev-server/~/socket.io-client/~/has-binary/~/isarray/index.js 120 bytes {0} [built]\r\n  [208] ./~/webpack-dev-server/~/socket.io-client/~/object-component/index.js 1.18 kB {0} [built]\r\n  [209] ./~/webpack-dev-server/~/socket.io-client/~/backo2/index.js 1.4 kB {0} [built]\r\n  [210] ./~/webpack-dev-server/~/strip-ansi/index.js 161 bytes {0} [built]\r\n  [211] ./~/webpack-dev-server/~/strip-ansi/~/ansi-regex/index.js 145 bytes {0} [built]\r\n  [212] ./~/webpack/hot/dev-server.js 1.85 kB {0} [built]\r\n  [213] ./~/webpack/hot/log-apply-result.js 813 bytes {0} [built]\r\n\r\nERROR in ./app/main.jsx\r\nModule build failed: TypeError: Function.prototype.apply: Arguments list has wrong type\r\n    at Object.module.exports (/Users/saul/projects/go/src/github.com/lucibus/lucibus/caido/node_modules/autopolyfiller-loader/index.js:12:36)\r\n @ multi main\r\nwebpack: bundle is now VALID.\r\n```\r\n\r\nI can't tell if this is an error in `autopolyfiller-loader` or my source code.\r\n\r\nMy `./app/main.jsx` file looks like this:\r\n\r\n```javascript\r\nimport React from 'react'\r\n\r\nimport App from './containers/App'\r\nimport controller from './controller'\r\nimport Storage from './Storage'\r\n\r\nimport addSystem from './actions/addSystem.js'\r\nimport createAddressOneSystem from './actions/createAddressOneSystem.js'\r\nimport moveSystem from './actions/moveSystem.js'\r\nimport outputSynced from './actions/outputSynced.js'\r\nimport selectSystem from './actions/selectSystem.js'\r\nimport setSynced from './actions/setSynced.js'\r\nimport changeSystemLevel from './actions/changeSystemLevel.js'\r\n\r\n// ACTIONS\r\ncontroller.signal('gotWebsocketMessage', setSynced)\r\ncontroller.signal('clickedAddAddressOne', createAddressOneSystem, addSystem, [outputSynced])\r\ncontroller.signal('draggedSystem', moveSystem, [outputSynced])\r\ncontroller.signal('clickedSystem', selectSystem)\r\ncontroller.signal('movedInspector', changeSystemLevel, [outputSynced])\r\n\r\nStorage.onMessage(controller.signals.gotWebsocketMessage)\r\n\r\nReact.render(\r\n  controller.injectInto(App),\r\n  document.getElementById('content')\r\n)\r\n```\r\n\r\nI can't find any uses of `apply` in my source code. I am, however, using `babel-loader` before this loader, so maybe that is making some use of apply that is wrong? My js loaders look like:\r\n\r\n```javascript\r\n['autopolyfiller?browsers=[\"last 2 versions\", \"ie >= 9\" ]', 'babel-loader?stage=0']\r\n```"},"comment":{"url":"https://api.github.com/repos/deepsweet/autopolyfiller-loader/issues/comments/129199613","html_url":"https://github.com/deepsweet/autopolyfiller-loader/issues/12#issuecomment-129199613","issue_url":"https://api.github.com/repos/deepsweet/autopolyfiller-loader/issues/12","id":129199613,"user":{"login":"saulshanabrook","id":1186124,"avatar_url":"https://avatars.githubusercontent.com/u/1186124?v=3","gravatar_id":"","url":"https://api.github.com/users/saulshanabrook","html_url":"https://github.com/saulshanabrook","followers_url":"https://api.github.com/users/saulshanabrook/followers","following_url":"https://api.github.com/users/saulshanabrook/following{/other_user}","gists_url":"https://api.github.com/users/saulshanabrook/gists{/gist_id}","starred_url":"https://api.github.com/users/saulshanabrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saulshanabrook/subscriptions","organizations_url":"https://api.github.com/users/saulshanabrook/orgs","repos_url":"https://api.github.com/users/saulshanabrook/repos","events_url":"https://api.github.com/users/saulshanabrook/events{/privacy}","received_events_url":"https://api.github.com/users/saulshanabrook/received_events","type":"User","site_admin":false},"created_at":"2015-08-09T15:41:47Z","updated_at":"2015-08-09T15:41:47Z","body":"OK I was enabling the loader wrong (using `loader` instead of `loaders`). Now when I start, I get a different error:\r\n\r\n\r\n```\r\nERROR in ./app/Storage.js\r\nModule build failed: Error: Cannot find module 'polyfill-service/polyfills/Window.prototype.JSON/polyfill'\r\n    at Function.Module._resolveFilename (module.js:336:15)\r\n    at Function.require.resolve (module.js:388:19)\r\n    at /Users/saul/projects/go/src/github.com/lucibus/lucibus/caido/node_modules/autopolyfiller-loader/index.js:23:59\r\n    at Array.forEach (native)\r\n    at Object.module.exports (/Users/saul/projects/go/src/github.com/lucibus/lucibus/caido/node_modules/autopolyfiller-loader/index.js:22:19)\r\n @ ./app/main.jsx 19:15-35\r\n```"}}