Bug: Maximum call stack size exceeded
See original GitHub issueI added new DuplicatesPlugin()
to my webpack config (node 12.8.1, npm 6.10.2, webpack 4.39.1) and after running webpack
I eventually got RangeError: Maximum call stack size exceeded
.
Here’s the stack trace (I trimmed the path to project out)
at String.split (<anonymous>)
at Object.exports.toPosixPath (node_modules/inspectpack/lib/util/files.js:34:38)
at node_modules/inspectpack/lib/util/dependencies.js:44:54
at Array.filter (<anonymous>)
at _recurseDependencies (node_modules/inspectpack/lib/util/dependencies.js:143:10)
at node_modules/inspectpack/lib/util/dependencies.js:187:32
at Array.map (<anonymous>)
at _recurseDependencies (node_modules/inspectpack/lib/util/dependencies.js:178:10)
at node_modules/inspectpack/lib/util/dependencies.js:187:32
at Array.map (<anonymous>)
at _recurseDependencies (node_modules/inspectpack/lib/util/dependencies.js:178:10)
at node_modules/inspectpack/lib/util/dependencies.js:187:32
at Array.map (<anonymous>)
at _recurseDependencies (node_modules/inspectpack/lib/util/dependencies.js:178:10)
at node_modules/inspectpack/lib/util/dependencies.js:187:32
at Array.map (<anonymous>)
at _recurseDependencies (node_modules/inspectpack/lib/util/dependencies.js:178:10)
...
Running with verbose: true
didn’t give any extra insight
I know probably informing you what’s in my package.json would help debug what’s going on, but we have a lot of packages so it’s tough to know what combination of packages is causing this issue. Is there a way for me to debug this further so that I know which combination of packages is responsible?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
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. More ......
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 >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 >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 >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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome – thanks!
I’ve been able to confirm the bug with a regression test at: https://github.com/FormidableLabs/inspectpack/compare/bug/recurse-deps (WIP branch)
Reproduction:
Thanks for the research work!
inspectpack should handle circular dependencies (which usually result from npm/yarn flattening). Is there any chance you can identify a small code snippet that triggers those?