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

I've got this on latest release when trying to rebuild

Open sibelius opened this issue 4 years ago • 9 comments

Error: No module factory available for dependency type: ModuleHotAcceptDependency
at addDependency (/app/node_modules/webpack/lib/Compilation.js:800:12)
at iterationOfArrayCallback (/app/node_modules/webpack/lib/Compilation.js:208:3)
at addDependenciesBlock (/app/node_modules/webpack/lib/Compilation.js:816:5)
at Compilation.processModuleDependencies (/app/node_modules/webpack/lib/Compilation.js:827:4)
at afterBuild (/app/node_modules/webpack/lib/Compilation.js:954:15)
at processTicksAndRejections (internal/process/task_queues.js:79:11)

sibelius avatar Mar 23 '20 11:03 sibelius

Hey @sibelius — thanks for flagging. Can you give me some repro steps for this? I haven't seen this error

stephencookdev avatar Mar 23 '20 11:03 stephencookdev

not sure if it is related to https://github.com/shellscape/webpack-plugin-serve

sibelius avatar Mar 23 '20 12:03 sibelius

I had the same error.

This commit removes the speed-measure-webpack-plugin from development and so that I can upgrade webpack: https://github.com/xcv58/Tab-Manager-v2/commit/75727bc82f84f0e3c41bf17a137021d9362b5013

And this line causes the bug: https://github.com/webpack/webpack/blob/2346f6b245a92f317535018129260d7c015734c9/lib/HotModuleReplacementPlugin.js#L191-L193

I guess the smp.wrap generate the WrappedPlugin for the plugin in webpack config. The generated plugin cause the condition (compilation.compiler !== compiler) be true.

xcv58 avatar Apr 15 '20 04:04 xcv58

Here is a cleaner reproduce PR: https://github.com/xcv58/react-starter-boilerplate-hmr/pull/1/files

xcv58 avatar Apr 15 '20 04:04 xcv58

I noticed this error when adding SMP to a storybook wepback config, if that's helpful at all.

IanVS avatar Jul 16 '20 00:07 IanVS

I also have this problem, how can I solve it?

toFrankie avatar May 26 '21 14:05 toFrankie

Been banging my head against a wall on this issue for the last 3 days now. Any movement here?

jlmitch avatar Jun 21 '21 17:06 jlmitch

My project builds fine without this plugin, but when I use it as the document shows, it has the error that all the less or file has build fail like this: ERROR in ./src/stylesheets/element.css No template for dependency: ModuleHotAcceptDependency @ ./src/pages/home/container/detailContainer.js 13:0-42 @ ./src/pages/home/routes.js 19:0-58 222:13-28 @ ./src/pages/home/index.tsx 16:0-43 113:14-29 its seems this pulgin conflicts with less loader or css loader?? `

ecnatsiDehTog avatar Dec 25 '21 04:12 ecnatsiDehTog

Could remove the HotModuleReplacementPlugin as plugin, and instead pass --hot when calling webpack serve

edelauna avatar Jun 02 '22 21:06 edelauna