S2 icon indicating copy to clipboard operation
S2 copied to clipboard

修复npm安装缺少src目录导致vite项目出现报错

Open charescape opened this issue 6 months ago • 4 comments

image

👀 PR includes

✨ Feature

  • [ ] New feature

🎨 Enhance

  • [ ] Code style optimization
  • [ ] Refactoring
  • [ ] Change the UI
  • [ ] Improve the performance
  • [ ] Type optimization

🐛 Bugfix

  • [x] Solve the issue: No routes matched location "/node_modules/@antv/s2/src/**/*.ts"

🔧 Chore

  • [ ] Test case
  • [ ] Docs / demos update
  • [ ] CI / workflow
  • [ ] Release version
  • [ ] Other ()

📝 Description

🖼️ Screenshot

Before After

🔗 Related issue link

🔍 Self-Check before the merge

  • [ ] Add or update relevant docs.
  • [ ] Add or update relevant demos.
  • [ ] Add or update test case.
  • [ ] Add or update relevant TypeScript definitions.

charescape avatar Jun 05 '25 09:06 charescape

你好 @charescape,非常感谢你的贡献. 为了让代码更健壮, 请根据 贡献指南 补充相应单元测试 (文档改动或其他特殊场景除外), 如果有 API 改动, 请修改 相应的文档. 同时请检查 linttest 相关 CI 是否通过, 如果失败, 请点击 [Details] 按钮查看, 并根据日志修复.

Hello, @charescape, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the docs if there are API changes. At the same time, please check whether the CI related to lint and test passes. If the CI fails, please click [Details] button to check and repair according to the log.

github-actions[bot] avatar Jun 05 '25 09:06 github-actions[bot]

@charescape 请先贴一个最简复现demo,以便明确问题

Alexzjt avatar Jun 05 '25 09:06 Alexzjt

@Alexzjt 等有空的时候我这边发一下报错的代码示例,大概率是S2 和 react 19 不兼容( react-router v7 + react 19 + s2 最新版 + s2-react 最新版)

charescape avatar Jun 10 '25 12:06 charescape

@Alexzjt 等有空的时候我这边发一下报错的代码示例,大概率是S2 和 react 19 不兼容( react-router v7 + react 19 + s2 最新版 + s2-react 最新版)

目前s2-react没有兼容react 19的,这个文件:packages/s2-react/src/utils/reactRender.ts

Alexzjt avatar Jun 11 '25 02:06 Alexzjt