When version > 2.4, Failed to Connect to the Backend Error: pkgJson.main?.endsWith is not a function

未关闭 适合新手
#219 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
67/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
领域
devtools

调研方向

首先在代码库中搜索 pkgJson.main?.endsWith,并追踪后端如何读取包元数据。使用报告中的设置运行 npx node-modules-inspector 重现故障,然后检查附近有关包入口处理的测试。对于报告的情况,后端能够在不出现此错误的情况下连接,且相关测试通过,即为完成。

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

描述

Describe the bug

When version > 2.4, Failed to Connect to the Backend Error: pkgJson.main?.endsWith is not a function

Reproduction

npx node-modules-inspector

System Info
System:
    OS: Windows 10 10.0.17763
  Binaries:
    Node: 22.22.3
    npm: 10.9.8
  Browsers:
    Chrome: 157.0.8103.51
Used Package Manager

npm

Validations
  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Contributions
  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
主要语言
TypeScript
星标
3k
派生
92
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

antfu/node-modules-inspector 的其他 Issue

查看 antfu/node-modules-inspector 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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