You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RangeError Maximum call stack size exceeded in cloneCallSite #252
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
Getting something similar in a Next.js app. @tomi have you found a workaround by a chance?
RangeError: Maximum call stack size exceeded
at RegExp.exec (<anonymous>)
at retrieveSourceMapURL (/path/to/project/node_modules/source-map-support/source-map-support.js:144:21)
at Array.<anonymous> (/path/to/project/node_modules/source-map-support/source-map-support.js:156:26)
at /path/to/project/node_modules/source-map-support/source-map-support.js:55:24
at mapSourcePosition (/path/to/project/node_modules/source-map-support/source-map-support.js:186:21)
at wrapCallSite (/path/to/project/node_modules/source-map-support/source-map-support.js:358:20)
at /path/to/project/node_modules/source-map-support/source-map-support.js:399:26
at Array.map (<anonymous>)
at Function.prepareStackTrace (/path/to/project/node_modules/source-map-support/source-map-support.js:398:30)
at prepareStackTrace (internal/errors.js:37:29)
at formatError (internal/util/inspect.js:907:19)
at formatRaw (internal/util/inspect.js:703:14)
at formatValue (internal/util/inspect.js:591:10)
at inspect (internal/util/inspect.js:221:10)
at formatWithOptions (internal/util/inspect.js:1693:40)
at Object.Console.<computed> (internal/console/constructor.js:277:10)
yarn why source-map-support
=> Found "source-map-support@0.5.13"
info Reasons this module exists
- "ts-node" depends on it
- Hoisted from "ts-node#source-map-support"
- Hoisted from "next#terser#source-map-support"
- Hoisted from "jest#jest-cli#@jest#core#jest-runner#source-map-support"
- Hoisted from "next#webpack#terser-webpack-plugin#terser#source-map-support"
@kachkaev I'm not 100% sure as I haven't been able to confirm this yet, but I have a working theory that the culprit might not be source-map-support after all. We were using an old version of applicationinsights library which had an issue that caused these type of errors. The older version of applicationinsights uses zone.js which injects itself pretty much everywhere and can cause hard to debug issues like this.
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:
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.
Reacted by Ben Limmer, Timon, Ori Maci, V, Francisco Gordillo, Artem Ryzhkin and toniriiii
@tgrassl I haven't seen this error for quite some time despite using ts-node in a few projects. I also don't remember what exactly I was doing when the error occurred for me. Upgrading to Node 14+ and ts-node 10+ might help (but I’m not sure).
Activity
kachkaev commentedon Oct 22, 2019
Getting something similar in a Next.js app. @tomi have you found a workaround by a chance?
tomi commentedon Oct 22, 2019
@kachkaev I'm not 100% sure as I haven't been able to confirm this yet, but I have a working theory that the culprit might not be
source-map-supportafter all. We were using an old version of applicationinsights library which had an issue that caused these type of errors. The older version ofapplicationinsightsuseszone.jswhich injects itself pretty much everywhere and can cause hard to debug issues like this.leandro-at-sensibill commentedon 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:
A few seconds later, mocha exits and I can see the following stack trace:
The source-map-support version I have in my project is
0.5.19.tgrassl commentedon Jun 22, 2021
@kachkaev Same issue here. How did you fix it for your app?
kachkaev commentedon Jun 22, 2021
@tgrassl I haven't seen this error for quite some time despite using
ts-nodein a few projects. I also don't remember what exactly I was doing when the error occurred for me. Upgrading to Node 14+ and ts-node 10+ might help (but I’m not sure).rusticarium commentedon 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
fix(webpack): externalize server source-map to prevent RangeError
fix(webpack): externalize server source-map to prevent RangeError
fix(webpack): externalize server source-map to prevent RangeError
fix(webpack): externalize server source-map to prevent RangeError
fix(webpack): externalize server source-map to prevent RangeError
Update dependencies and add npm setup script
Update dependencies and add npm setup script
Update dependencies and add npm setup script
kyteague commentedon Sep 27, 2023
Still an issue for us 4 years later. Only starts occurring in node v16. This is the only blocker we have in upgrading node right now.
Update dependencies and add npm setup script
danramos-evoiq commentedon Jan 9, 2024
Still having the same issue, any update on this ?
isaac-levine commentedon Aug 8, 2024
Any update???