evanw / evanw/node-source-map-support
RangeError Maximum call stack size exceeded when testing Vue project
- Lingua principale
- JavaScript
- Stelle
- 2.2k
- Fork
- 223
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo il fallimento del test Vue tramite vue-cli-service, quindi esamina retrieveSourceMapURL, mapSourcePosition e prepareStackTrace in source-map-support.js insieme al percorso mochapack TestRunner.Reporter.onLoadingException mostrato nel trace. Il lavoro è completato quando viene identificata e testata una modifica che impedisca lo stack overflow durante il caricamento di source maps di grandi dimensioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, node.js
- Ambito
- testing-qa, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100