evanw / evanw/node-source-map-support

RangeError Maximum call stack size exceeded when testing Vue project

Offen
#319 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
2.2k
Forks
223
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi, this is somewhat of a duplicate of these issues: #252, #249, and #86. But I wanted to call more attention to it.

I am getting this error when attempting to test our Vue project using vue-cli-service :

```
RangeError: Maximum call stack size exceeded
at RegExp.exec ()
at retrieveSourceMapURL (D:\a\_work\1\s\common\temp\node_modules\.pnpm\source-map-support@0.5.21\node_modules\source-map-support\source-map-support.js:174:21)
at Array. (D:\a\_work\1\s\common\temp\node_modules\.pnpm\source-map-support@0.5.21\node_modules\source-map-support\source-map-support.js:186:26)
at D:\a\_work\1\s\common\temp\node_modules\.pnpm\source-map-support@0.5.21\node_modules\source-map-support\source-map-support.js:85:24
at mapSourcePosition (D:\a\_work\1\s\common\temp\node_modules\.pnpm\source-map-support@0.5.21\node_modules\source-map-support\source-map-support.js:216:21)
at wrapCallSite (D:\a\_work\1\s\common\temp\node_modules\.pnpm\source-map-support@0.5.21\node_modules\source-map-support\source-map-support.js:397:20)
at Function.prepareStackTrace (D:\a\_work\1\s\common\temp\node_modules\.pnpm\source-map-support@0.5.21\node_modules\source-map-support\source-map-support.js:446:39)
at maybeOverridePrepareStackTrace (node:internal/errors:141:29)
at prepareStackTrace (node:internal/errors:115:5)
at TestRunner.Reporter.onLoadingException (D:\a\_work\1\s\common\temp\node_modules\.pnpm\mochapack@2.1.4_mocha@8.4.0+webpack@5.72.0\node_modules\mochapack\src\runner\testRunnerReporter.ts:104:13)

```

The version of our source-map-support is `0.5.21`.

I believe the issue is coming from having large source maps that are being pulled in during the test, and the regex trying to scan through it. Is there a way to fix this to help further avoid this error?

Let me know if there's anything I can help out with in terms of solving this, or if there's anything more I should understand about the current state of the code and why this issue is happening.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne damit, den Vue-Testfehler über vue-cli-service zu reproduzieren, und untersuche anschließend retrieveSourceMapURL, mapSourcePosition und prepareStackTrace in source-map-support.js zusammen mit dem im Trace gezeigten mochapack-Pfad TestRunner.Reporter.onLoadingException. Als erledigt gilt die Identifizierung und das Testen einer Änderung, die den Stack Overflow beim Laden großer Source Maps verhindert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, node.js
Bereich
testing-qa, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.