Open someden opened 3 years ago
Having the same issue with copy-webpack-plugin
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_ADDITIONS' of undefined
mini-css-extract-plugin@1.3.9
(1.3.6 was fine)
TypeError: Class extends value undefined is not a constructor or null
because webpack.Module
is undefined
Yep, same issue with terser-webpack-plugin@5.1.1
and mini-css-extract-plugin@1.3.9
.
Same issue with html-webpack-plugin@5.3.1
:
const HtmlWebpackPlugin = require("html-webpack-plugin")
const SpeedMeasurePlugin = require("speed-measure-webpack-plugin")
const smp = new SpeedMeasurePlugin()
module.exports = smp.wrap({
plugins: [
new HtmlWebpackPlugin(),
],
})
(node:34911) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
(Use `node --trace-deprecation ...` to show where the warning was created)
[webpack-cli] TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE' of undefined
at Proxy.<anonymous> (/…/node_modules/html-webpack-plugin/index.js:222:31)
at /…/node_modules/speed-measure-webpack-plugin/WrappedPlugin/index.js:52:19
at Hook.eval (eval at create (/…/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:25:1)
at Hook.CALL_DELEGATE [as _call] (/…/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/…/node_modules/webpack/lib/Compiler.js:992:30)
at /…/node_modules/webpack/lib/Compiler.js:1035:29
at Hook.eval [as callAsync] (eval at create (/…/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/…/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile (/…/node_modules/webpack/lib/Compiler.js:1030:28)
at /…/node_modules/webpack/lib/Compiler.js:473:12
And with favicons-webpack-plugin@5.0.2
. The error is different though (PROCESS_ASSETS_STAGE_ADDITIONS
instead of PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE
):
(node:35340) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
(Use `node --trace-deprecation ...` to show where the warning was created)
[webpack-cli] TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_ADDITIONS' of undefined
at Proxy.<anonymous> (/…/node_modules/favicons-webpack-plugin/src/index.js:249:30)
at /…/node_modules/speed-measure-webpack-plugin/WrappedPlugin/index.js:52:19
at Hook.eval (eval at create (/…/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:25:1)
at Hook.CALL_DELEGATE [as _call] (/…/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/…/node_modules/webpack/lib/Compiler.js:992:30)
at /…/node_modules/webpack/lib/Compiler.js:1035:29
at Hook.eval [as callAsync] (eval at create (/…/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/…/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile (/…/node_modules/webpack/lib/Compiler.js:1030:28)
at /…/node_modules/webpack/lib/Compiler.js:473:12
We found that this plugin is incompatible with html-inline-script-webpack-plugin, but only when used with webpack-dev-server. I left some debug notes here
I found some plugins that causes errors while use with
speed-measure-webpack-plugin
Environment
Plugin:
"terser-webpack-plugin": "5.1.1"
Simple config to reproduce:
Plugin:
"compression-webpack-plugin": "7.1.2"
Simple config to reproduce:
Also I noticed similar problems in #155 and #149 with
html-webpack-plugin
,favicons-webpack-plugin
, andcopy-webpack-plugin
Could anybody explain, on what side we should fix it? Here in speed-measure-webpack-plugin? Or it's better to create issues in these plugins' repos and fix it there?