- webpack: 1.12.14
- tapable: 0.1.10
While editing webpack config file we met the following error:
<<PROJECT_PATH>>\node_modules\tapable\lib\Tapable.js:164 arguments[i].apply(this); ^ TypeError: arguments[i].apply is not a function at Compiler.apply (<<PROJECT_PATH>>\node_modules\tapable\lib\Tapable.js:164:16)
and that seemed a situation similar to issue #697 .
We 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:
config.plugins = [ // some plugins added here ... ]; // further down config.plugins.push([ // another plugin here, but mistakenly added as a whole array ]);
The fix was of course to properly add the new plugin as a single item:
config.plugins.push( // another plugin here, correctly added as a single item );
Request: try to improve argument checking or anyway improve error messages.
Thanks for your time spent on this great project!