stephencookdev / speed-measure-webpack-plugin

⏱ See how fast (or not) your plugins and loaders are, so you can optimise your builds
MIT License
2.42k stars 79 forks source link

TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_ADDITIONS' of undefined when using speed-measure-webpack-plugin #155

Open ceisele-r opened 3 years ago

ceisele-r commented 3 years ago

As soon as I add the smp.wrap(..) around my webpack config, I am getting the following exception:

(node:29480) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
[webpack-cli] TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_ADDITIONS' of undefined
    at Proxy.<anonymous> (C:\proj\app\node_modules\copy-webpack-plugin\dist\index.js:462:45)
    at C:\proj\app\node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:52:19
    at Hook.eval [as call] (eval at create (C:\proj\app\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:5:1)
    at Hook.CALL_DELEGATE [as _call] (C:\proj\app\node_modules\tapable\lib\Hook.js:14:14)
    at Compiler.newCompilation (C:\proj\app\node_modules\webpack\lib\Compiler.js:990:30)
    at C:\proj\app\node_modules\webpack\lib\Compiler.js:1033:29
    at eval (eval at create (C:\proj\app\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at C:\proj\app\node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:44:9
    at Proxy.<anonymous> (C:\proj\app\node_modules\webpack\lib\DllReferencePlugin.js:80:12)
    at C:\proj\app\node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:40:16

As you can see, we are using the copy-webpack-plugin. Without the smp.wrap(...), everything works as expected.

The environment is:

takhello commented 3 years ago

same situation

takhello commented 3 years ago

[webpack-cli] TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_ADDITIONS' of undefined

ceisele-r commented 3 years ago

Relates to https://github.com/stephencookdev/speed-measure-webpack-plugin/issues/149

caseyjhol commented 3 years ago

Getting the same error with:

marcobouwmeester commented 3 years ago

I am having the same issue. It seems to be caused by copy-webpack-plugin v7.0.0 . Downgrading back to v6.0.4 seems to resolve the error for now.

Kocal commented 3 years ago

I have the same issue with favicons-webpack-plugin at version ^5.0.0-alpha.11

zhangzippo commented 3 years ago

i have the same issue too