cspotcode / cspotcode/node-source-map-support

RangeError: Maximum call stack size exceeded (problematic regexp for long in line source maps)

Abierto
#49 1 comentario 9 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
16
Forks
4
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

We work on a large application, and next.js transitively uses this package for inline source maps.

The regexp used to detect the contents of the source maps starts to choke on inline source maps created for Emscripten-generated loader Javascript.

```
RangeError: Maximum call stack size exceeded
at RegExp.exec ()
at retrieveSourceMapURL (C:\Users\bberman\Documents\appmana\node_modules\@cspotcode\source-map-support\source-map-support.js:340:21)
at Array. (C:\Users\bberman\Documents\appmana\node_modules\@cspotcode\source-map-support\source-map-support.js:353:26)
at C:\Users\bberman\Documents\appmana\node_modules\@cspotcode\source-map-support\source-map-support.js:199:32
at mapSourcePosition (C:\Users\bberman\Documents\appmana\node_modules\@cspotcode\source-map-support\source-map-support.js:383:21)
at wrapCallSite (C:\Users\bberman\Documents\appmana\node_modules\@cspotcode\source-map-support\source-map-support.js:592:20)
at Function.prepareStackTrace (C:\Users\bberman\Documents\appmana\node_modules\@cspotcode\source-map-support\source-map-support.js:671:41)
at maybeOverridePrepareStackTrace (node:internal/errors:142:29)
at prepareStackTrace (node:internal/errors:116:5)
at getStackString (node:internal/util/inspect:1240:16)
at formatError (node:internal/util/inspect:1369:15)
at formatRaw (node:internal/util/inspect:985:14)
at formatValue (node:internal/util/inspect:840:10)
at inspect (node:internal/util/inspect:364:10)
at formatWithOptionsInternal (node:internal/util/inspect:2298:40)
```

This is actually a very painful error. I am hoping you can deal with the data URI-style values on the right hand side of the source map marker potentially without using a regular expression to find the right hand side.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.