awesome-typescript-loader icon indicating copy to clipboard operation
awesome-typescript-loader copied to clipboard

Please provide peerDependency for webpack version

Open btzdnl opened this issue 7 years ago • 1 comments

Currently, I can install the latest version (5.2.0) of awesome-typescript-loader in combination with Webpack 2.2.x with no warning whatsoever.

When running Webpack however, it all falls apart:

...\node_modules\awesome-typescript-loader\src\watch-mode.ts:5
                compiler.hooks.run.tapAsync('at-loader', function(params, callback) {
                 ^
TypeError: Cannot read property 'run' of undefined
    at CheckerPlugin.apply (...\node_modules\awesome-typescript-loader\src\watch-mode.ts:5:18)
    at Compiler.apply (...\node_modules\tapable\lib\Tapable.js:375:16)
    at webpack (...\node_modules\webpack\lib\webpack.js:32:19)
    at options.map.options (...\node_modules\webpack\lib\webpack.js:23:55)
    at Array.map (<anonymous>)
    at webpack (...\node_modules\webpack\lib\webpack.js:23:40)
    at processOptions (...\node_modules\webpack\bin\webpack.js:305:14)
    at Object.<anonymous> (...\node_modules\webpack\bin\webpack.js:363:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

That’s because there’s no compiler.hooks in Webpack 2.x.

This problem could easily be prevented by specifying compatible Webpack versions in package.json.

btzdnl avatar Sep 08 '18 17:09 btzdnl

Also having this issue, needed to update webpack to 4+.

gruckion avatar Mar 14 '19 11:03 gruckion