Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

RangeError Maximum call stack size exceeded when testing Vue project

未关闭
#319 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞

调研方向

首先通过 vue-cli-service 重现 Vue 测试失败,然后结合 trace 中显示的 mochapack TestRunner.Reporter.onLoadingException 路径,检查 source-map-support.js 中的 retrieveSourceMapURL、mapSourcePosition 和 prepareStackTrace。完成的标准是确定并测试一项在加载大型 source map 时防止 stack overflow 的更改。

由索引模型根据 Issue 内容生成。

描述

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 (<anonymous>)
    at retrieveSourceMapURL (D:\a\_work\1\s\common\temp\node_modules\.pnpm\[email protected]\node_modules\source-map-support\source-map-support.js:174:21)
    at Array.<anonymous> (D:\a\_work\1\s\common\temp\node_modules\.pnpm\[email protected]\node_modules\source-map-support\source-map-support.js:186:26)
    at D:\a\_work\1\s\common\temp\node_modules\.pnpm\[email protected]\node_modules\source-map-support\source-map-support.js:85:24
    at mapSourcePosition (D:\a\_work\1\s\common\temp\node_modules\.pnpm\[email protected]\node_modules\source-map-support\source-map-support.js:216:21)
    at wrapCallSite (D:\a\_work\1\s\common\temp\node_modules\.pnpm\[email protected]\node_modules\source-map-support\source-map-support.js:397:20)
    at Function.prepareStackTrace (D:\a\_work\1\s\common\temp\node_modules\.pnpm\[email protected]\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\[email protected][email protected][email protected]\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.

主要语言
JavaScript
星标
2.2k
派生
221
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

evanw/node-source-map-support 的其他 Issue

查看 evanw/node-source-map-support 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。