webpack: Webpack is crashing with HookWebpackError: Maximum call stack size exceeded
Bug report
Error: [webpack-cli] HookWebpackError: Maximum call stack size exceeded
What is the current behavior?
Webpack fails with the above error when I run it.
If the current behavior is a bug, please provide the steps to reproduce.
- Follow webpack website’s instructions verbatim for setting up webpack with TypeScript, HtmlWebpackPlugin, and CopyPlugin
- Copy 2 woff files and 2 css files from node_modules into build using CopyPlugin ordered before HtmlWebpackPlugin
- Run webpack and watch it crash
What is the expected behavior?
Ideally it should not crash.
Other relevant information:
webpack version: ^5.71.0
Node.js version: v16.10.0
Operating System: Windows 11 Pro 21H2
Additional tools: Laptop, keyboard, mouse, mousepad, laptop charger
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 38 (23 by maintainers)
Interestingly, it succeeds (and continues to if started in watch-mode) if there’s no build dir (e.g. I delete it before running webpack). But it always fails with this error when it sees the build dir when starting.