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

Deprecation Warning for Compilation.hooks.normalModuleLoader

Open protoEvangelion opened this issue 4 years ago • 17 comments

Getting webpack deprecation warning on v1.3.3 & webpack v5.0.0-beta.17:

[DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader

It's occuring right here: node_modules/speed-measure-webpack-plugin/WrappedPlugin/index.js:148:19

Maybe because every available webpack hook is being wrapped here: node_modules/speed-measure-webpack-plugin/WrappedPlugin/index.js:147:38?

  const wrapped = Object.keys(hooks).reduce((acc, method) => {
    acc[method] = genProxy(method);
    return acc;
  }, {});

protoEvangelion avatar Jun 17 '20 23:06 protoEvangelion

+1

tjx666 avatar Oct 13 '20 16:10 tjx666

Since webpack v5 normalModuleLoader hook was removedhttps://webpack.js.org/api/compilation-hooks/#normalmoduleloader. The smp registered the hook at therehttps://github.com/stephencookdev/speed-measure-webpack-plugin/blob/b5ff09e699416fe336d1df1896af5c50e6596deb/index.js#L159.It's seem like the author hadn't adapted to the Webpack v5 very well,although the official support of webpack v5 has been announced in the v1.4.2 version.

ermuz avatar Feb 08 '21 09:02 ermuz

This could probably be closed in favor of #149 which includes other v5-specific concerns. Official support for Webpack 5 still isn't quite here yet.

thw0rted avatar Apr 14 '21 09:04 thw0rted

any news on this?

pumano avatar Sep 20 '21 10:09 pumano

DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader

zjtt avatar Jan 17 '22 11:01 zjtt

same question at 2022.2.26

yxlolxy avatar Feb 26 '22 01:02 yxlolxy

Same Here!

AdamElhawary avatar Apr 02 '22 21:04 AdamElhawary

收到啦,谢谢

zjtt avatar Apr 02 '22 21:04 zjtt

Still an issue with me, Webpack ^5.73.0 and using speed-measure-webpack-plugin ^1.5.0

justinfarrelldev avatar Jul 20 '22 18:07 justinfarrelldev

Any updates on this?

RemLawrence avatar Aug 31 '22 18:08 RemLawrence

2022-10-27 还在出现这个问题,"speed-measure-webpack-plugin": "^1.5.0", webpack ^5

2812848295 avatar Oct 27 '22 11:10 2812848295

收到啦,谢谢

zjtt avatar Oct 27 '22 11:10 zjtt

Still an issue with me, Webpack 5.75.0 and using speed-measure-webpack-plugin 1.5.0

ltc117 avatar Jan 03 '23 11:01 ltc117

(node:43571) [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)

Same issue. getting stuck here when trying to build "react-scripts": "^5.0.1", "react": "^17.0.2", "react-app-rewired": "^2.1.8",

sandrinjoy avatar Feb 11 '23 11:02 sandrinjoy

(node:43571) [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)

Same issue. getting stuck here when trying to build "react-scripts": "^5.0.1", "react": "^17.0.2", "react-app-rewired": "^2.1.8",

same to me.

(node:1012) [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)

qidasheng369 avatar Jul 26 '23 01:07 qidasheng369

Has this been resolved?

amandogra avatar Aug 29 '23 05:08 amandogra

I recently upgraded React 16 to 18, and now I am getting this warning every time I tried to run npm run build DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader

Has anyone found a fix for this warning?

yangs2016 avatar Oct 24 '23 18:10 yangs2016