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

v4.0.0-beta.0: Error: No dependency factory available for this dependency type: EntryDependency #2876

Closed
1 of 2 tasks
Semigradsky opened this issue Nov 30, 2020 · 2 comments · Fixed by #2920
Closed
1 of 2 tasks

Comments

@Semigradsky
Copy link

Semigradsky commented Nov 30, 2020

  • Operating System: Ubuntu
  • Node Version: v14.15.0
  • NPM Version: 6.14.8
  • webpack Version: 5.9.0
  • webpack-dev-server Version: v4.0.0-beta.0
  • This is a bug
  • This is a modification request

Code

// webpack.config.js
  entry: {},

Expected Behavior

No error

Actual Behavior

Error:

<e> [webpack-dev-middleware] Error: No dependency factory available for this dependency type: EntryDependency
<e>     at Compilation.addModuleChain (.../node_modules/webpack/lib/Compilation.js:1632:5)
<e>     at Compilation._addEntryItem (.../node_modules/webpack/lib/Compilation.js:1742:8)
<e>     at Compilation.addEntry (.../node_modules/webpack/lib/Compilation.js:1673:8)
<e>     at .../node_modules/webpack-dev-server/lib/utils/DevServerPlugin.js:163:29
<e>     at new Promise (<anonymous>)
<e>     at .../node_modules/webpack-dev-server/lib/utils/DevServerPlugin.js:162:15
<e>     at Array.map (<anonymous>)
<e>     at .../node_modules/webpack-dev-server/lib/utils/DevServerPlugin.js:160:29
<e>     at Hook.eval [as callAsync] (eval at create (.../node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:38:17)
<e>     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (.../node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)

For Bugs; How can we reproduce the behavior?

I have only entrypoints generated by plugins (ModuleFederationPlugin) and I get this error when I set empty object {} to entry.

As a workaround I can set path to empty js file. In this case, I get no error.

@alexander-akait
Copy link
Member

Please use the issue template, otherwise it will be closed

@Semigradsky
Copy link
Author

Semigradsky commented Dec 1, 2020

Reproducible example: https://github.com/Semigradsky/webpack-dev-server-2876

yarn build works
yarn start returns error

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

Successfully merging a pull request may close this issue.

2 participants