RangeError: Maximum call stack size exceeded
See original GitHub issueBug report
What is the current behavior?
After running npm run prod
, webpack throws,
➜ aem-test git:(main) ✗ npm run prod
> aem-maven-archetype@1.0.0 prod
> NODE_ENV=production webpack --config ./webpack.prod.js && clientlib --verbose
/Users/kolivar/aem-test/node_modules/webpack/lib/util/runtime.js:60
exports.forEachRuntime = (runtime, fn, deterministicOrder = false) => {
^
RangeError: Maximum call stack size exceeded
at exports.forEachRuntime (/Users/kolivar/aem-test/node_modules/webpack/lib/util/runtime.js:60:26)
at ExportInfo.setUsed (/Users/kolivar/aem-test/node_modules/webpack/lib/ExportsInfo.js:1017:4)
at ExportsInfo.setUsedWithoutInfo (/Users/kolivar/aem-test/node_modules/webpack/lib/ExportsInfo.js:392:31)
at processReferencedModule (/Users/kolivar/aem-test/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:80:25)
at processModule (/Users/kolivar/aem-test/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:270:9)
at processModule (/Users/kolivar/aem-test/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:206:10)
at processModule (/Users/kolivar/aem-test/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:206:10)
at processModule (/Users/kolivar/aem-test/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:206:10)
at processModule (/Users/kolivar/aem-test/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:206:10)
at processModule (/Users/kolivar/aem-test/node_modules/webpack/lib/FlagDependencyUsagePlugin.js:206:10)
If the current behavior is a bug, please provide the steps to reproduce.
- Clone https://github.com/kevinolivar/aem-test
- Run
npm run prod
What is the expected behavior?
The application should successfully be built as with using the command npm run dev
.
If it can also help investigating this issue, I first thought it was maybe related to MiniCssExtractPlugin. Here some more details on that issue https://github.com/webpack-contrib/mini-css-extract-plugin/issues/733. However, the problem may also be in webpack.
Other relevant information: webpack version: 5.65.0 Node.js version: 16.11.1 Operating System: Mac OS Big Sur 11.5.2 (20G95) Additional tools: npm version: 8.0.0 yarn version: 1.22.5 webpack-cli version: 4.9.1 webpack-dev-server version: 4.7.1 webpack-merge version: 5.8.0 mini-css-extract-plugin version: 2.4.5
Issue Analytics
- State:
- Created 2 years ago
- Comments:20 (10 by maintainers)
Top GitHub Comments
@alexander-akait circular import itself works fine in js and css (mini-css) I have checked
Let’s keep open, webpack still should not throw an error on circular dependencies