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 in cloneCallSite

See original GitHub issue

We are experiencing a RangeError similar to issue #93 in our Node.js app. I haven’t been able to reproduce it and it seems to be occurring randomly at times.

/usr/src/app/node_modules/source-map-support/source-map-support.js:331
   Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
                                                            ^

RangeError: Maximum call stack size exceeded

We are using the latest version 0.5.13 and latest 10 version of Node.js

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:6

github_iconTop GitHub Comments

5reactions
leandro-at-sensibillcommented, Aug 27, 2020

I’ve been having the exact same problem when debugging a TypeScript mocha test. I am using RubyMine, and this is the command line that starts the debug session:

/Users/leandrocolodete/.nvm/versions/node/v12.18.3/bin/node --inspect-brk=57678 /Users/leandrocolodete/my-project/node_modules/mocha/bin/_mocha --require ts-node/register --timeout 0 --ui bdd --reporter "/Users/leandrocolodete/Library/Application Support/RubyMine2018.3/NodeJS/js/mocha-intellij/lib/mochaIntellijReporter.js" /Users/leandrocolodete/my-project/src/tests/controllers/ExaaSController_test.ts --grep "^my test$"
Debugger listening on ws://127.0.0.1:57678/4c98c066-b365-4648-ab7c-e39fbab84aec
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.

A few seconds later, mocha exits and I can see the following stack trace:

RangeError: Maximum call stack size exceeded
    at RegExp.exec (<anonymous>)
    at retrieveSourceMapURL (/Users/leandrocolodete/my-project/node_modules/source-map-support/source-map-support.js:154:21)
    at Array.<anonymous> (/Users/leandrocolodete/my-project/node_modules/source-map-support/source-map-support.js:166:26)
    at /Users/leandrocolodete/my-project/node_modules/source-map-support/source-map-support.js:65:24
    at mapSourcePosition (/Users/leandrocolodete/my-project/node_modules/source-map-support/source-map-support.js:196:21)
    at wrapCallSite (/Users/leandrocolodete/my-project/node_modules/source-map-support/source-map-support.js:377:20)
    at Function.prepareStackTrace (/Users/leandrocolodete/my-project/node_modules/source-map-support/source-map-support.js:426:39)
    at maybeOverridePrepareStackTrace (internal/errors.js:87:29)
    at prepareStackTrace (internal/errors.js:66:5)
    at Object.exports.handler (/Users/leandrocolodete/my-project/node_modules/mocha/lib/cli/run.js:321:31)

The source-map-support version I have in my project is 0.5.19.

3reactions
wagner-danielcommented, Dec 14, 2021

I experienced the same issue. I used webpack v5 with typescript. The fix for me was changing

devtool: 'inline-source-map',

to

devtool: 'source-map',

in my webpack.config.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript RangeError: Maximum Call Stack Size Exceeded
The RangeError: Maximum call stack size exceeded is thrown when a function call is made that exceeds the call stack size. This can...
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 >
JavaScript Error: Maximum Call Stack Size Exceeded
A RangeError typically means an error has occurred outside of a code's argument value for its parameter. Now that you know a little...
Read more >
RangeError: Maximum call stack size exceeded - Educative.io
RangeError : Maximum call stack size exceeded ... not being met and is, therefore, calling the function again and again until you hit...
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