speed-measure-webpack-plugin icon indicating copy to clipboard operation
speed-measure-webpack-plugin copied to clipboard

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

Open ceisele-r opened this issue 4 years ago • 7 comments

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:

  • node v12.19.0
  • webpack 5.16.0
  • copy-webpack-plugin 7.0.0
  • webpack-cli 4.4.0

ceisele-r avatar Jan 25 '21 08:01 ceisele-r

same situation

takhello avatar Jan 25 '21 14:01 takhello

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

takhello avatar Jan 25 '21 15:01 takhello

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

ceisele-r avatar Jan 25 '21 15:01 ceisele-r

Getting the same error with:

  • node v14.10.0
  • webpack v5.18.0
  • webpack-cli v4.4.0

caseyjhol avatar Jan 28 '21 17:01 caseyjhol

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.

marcobouwmeester avatar Jan 29 '21 10:01 marcobouwmeester

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

Kocal avatar Jan 31 '21 20:01 Kocal

i have the same issue too

zhangzippo avatar Feb 07 '21 11:02 zhangzippo