question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RangeError: Maximum call stack size exceeded

See original GitHub issue

Bug 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.

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:closed
  • Created 2 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
vankopcommented, Mar 23, 2022

@alexander-akait circular import itself works fine in js and css (mini-css) I have checked

2reactions
alexander-akaitcommented, Dec 29, 2021

Let’s keep open, webpack still should not throw an error on circular dependencies

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Maximum call stack size exceeded error
It means that somewhere in your code, you are calling a function which in turn calls another function and so forth, until you...
Read more >
JavaScript Error: Maximum Call Stack Size Exceeded
If you see the “Maximum Call Stack Size Exceeded” error, there's likely a problem with a recursive function within your JavaScript code.
Read more >
RangeError: Maximum call stack size exceeded - Educative.io
The most common source for this error is infinite recursion. You must have a recursive function in your code whose base case is...
Read more >
Uncaught RangeError: Maximum call ... - Net-Informations.Com
This error is almost always means you have a problem with recursion in JavaScript code, as there isn't any other way in JavaScript...
Read more >
How to fix: "RangeError: Maximum call stack size exceeded"
A "RangeError: Maximum call stack size exceeded" is an error that occurs when a function or operation tries to execute too many nested...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found