Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sibelius opened this issue Mar 23, 2020 · 9 comments
Open

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

sibelius opened this issue Mar 23, 2020 · 9 comments

Comments

@sibelius
Copy link

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)
@stephencookdev
Copy link
Owner

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

@sibelius
Copy link
Author

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

@xcv58
Copy link

xcv58 commented Apr 15, 2020

I had the same error.

This commit removes the speed-measure-webpack-plugin from development and so that I can upgrade webpack:
xcv58/Tab-Manager-v2@75727bc

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
Copy link

xcv58 commented Apr 15, 2020

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

@IanVS
Copy link

IanVS commented Jul 16, 2020

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

@toFrankie
Copy link

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

@jlmitch
Copy link

jlmitch commented Jun 21, 2021

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

@ecnatsiDehTog
Copy link

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??
`

@edelauna
Copy link

edelauna commented Jun 2, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants