{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/2217","repository_url":"https://api.github.com/repos/webpack/webpack","labels_url":"https://api.github.com/repos/webpack/webpack/issues/2217/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/2217/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/2217/events","html_url":"https://github.com/webpack/webpack/issues/2217","id":142462589,"number":2217,"title":"Hard to debug TypeError: arguments[i].apply is not a function","user":{"login":"BrainCrumbz","id":3185573,"avatar_url":"https://avatars.githubusercontent.com/u/3185573?v=3","gravatar_id":"","url":"https://api.github.com/users/BrainCrumbz","html_url":"https://github.com/BrainCrumbz","followers_url":"https://api.github.com/users/BrainCrumbz/followers","following_url":"https://api.github.com/users/BrainCrumbz/following{/other_user}","gists_url":"https://api.github.com/users/BrainCrumbz/gists{/gist_id}","starred_url":"https://api.github.com/users/BrainCrumbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrainCrumbz/subscriptions","organizations_url":"https://api.github.com/users/BrainCrumbz/orgs","repos_url":"https://api.github.com/users/BrainCrumbz/repos","events_url":"https://api.github.com/users/BrainCrumbz/events{/privacy}","received_events_url":"https://api.github.com/users/BrainCrumbz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webpack/webpack/labels/enhancement","name":"enhancement","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-03-21T20:35:46Z","updated_at":"2016-09-24T13:27:51Z","closed_at":null,"body":"Packages version:\r\n * webpack: 1.12.14\r\n * tapable: 0.1.10\r\n\r\nWhile editing webpack config file we met the following error:\r\n\r\n~~~\r\n<<PROJECT_PATH>>\\node_modules\\tapable\\lib\\Tapable.js:164\r\n                arguments[i].apply(this);\r\n                             ^\r\n\r\nTypeError: arguments[i].apply is not a function\r\n    at Compiler.apply (<<PROJECT_PATH>>\\node_modules\\tapable\\lib\\Tapable.js:164:16)\r\n~~~\r\n\r\nand that seemed a situation similar to issue #697 .\r\n\r\nWe were able to spot the offending change after some time, but still the message was not at all helpful. In our case, error was due to the following:\r\n\r\n~~~javascript\r\nconfig.plugins = [\r\n  // some plugins added here ...\r\n];\r\n\r\n// further down\r\n\r\nconfig.plugins.push([\r\n  // another plugin here, but mistakenly added as a whole array\r\n]);\r\n~~~\r\n\r\nThe fix was of course to properly add the new plugin as a single item:\r\n\r\n~~~javascript\r\nconfig.plugins.push(\r\n  // another plugin here, correctly added as a single item\r\n);\r\n~~~\r\n\r\nRequest: try to improve argument checking or anyway improve error messages.\r\n\r\nThanks for your time spent on this great project!"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/249364851","html_url":"https://github.com/webpack/webpack/issues/2217#issuecomment-249364851","issue_url":"https://api.github.com/repos/webpack/webpack/issues/2217","id":249364851,"user":{"login":"MoOx","id":157534,"avatar_url":"https://avatars.githubusercontent.com/u/157534?v=3","gravatar_id":"","url":"https://api.github.com/users/MoOx","html_url":"https://github.com/MoOx","followers_url":"https://api.github.com/users/MoOx/followers","following_url":"https://api.github.com/users/MoOx/following{/other_user}","gists_url":"https://api.github.com/users/MoOx/gists{/gist_id}","starred_url":"https://api.github.com/users/MoOx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoOx/subscriptions","organizations_url":"https://api.github.com/users/MoOx/orgs","repos_url":"https://api.github.com/users/MoOx/repos","events_url":"https://api.github.com/users/MoOx/events{/privacy}","received_events_url":"https://api.github.com/users/MoOx/received_events","type":"User","site_admin":false},"created_at":"2016-09-24T13:27:51Z","updated_at":"2016-09-24T13:27:51Z","body":"Getting this issue (or at least similar message: `arguments[i].apply is not a function`), using nodejs api. webpack() does not throw an error, but instead pass the error (instanceof Error) instead of the \"stats\" object (where I were trying to call .toJSON() on, so took me a while to find the origin of the issue). This is pretty weird webpack does call instead of throwing, like it usually does (note that I am using webpack 2.1.0-beta.25)."}}
{"actor":{"display_login":"MoOx"}}