react-reconciler renderers (react-three-fiber) crash at import: the react shim has no __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE (0.2.1, 0.3.1)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- react, typescript
调研方向
Start by reading the Vite plugin’s React shim at dist/react/index.js and tracing how the plugin substitutes it during dependency pre-bundling. Check how react-reconciler accesses __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, then compare the proposed shim change with the alternative importer-level skip behavior. Done when a reproducer using @react-three/fiber imports and mounts successfully, or the supported limitations and workaround are documented.
由索引模型根据 Issue 内容生成。
描述
What happens
Any react-reconciler based renderer breaks under the Vite plugin. With @react-three/fiber in the app, the first import of its module throws and the page never renders:
TypeError: Cannot read properties of undefined (reading 'S')
at createReconciler (react-three-fiber.esm-*.js)
The pre-bundled fiber chunk resolves react to @tanstack/redact/dist/react/index.js. react-reconciler reads React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE at module evaluation and then .S on it; the shim does not export that object, so the read is on undefined. Same in 0.2.1 and 0.3.1 (dist/react/index.js has no __CLIENT_INTERNALS in either).
Reproduction
- Vite 8.3.4,
@vitejs/plugin-react6.1.2,react/react-dom19.3.1,@react-three/fiber9.8.2,three0.186.1,@tanstack/redact0.2.1 (also 0.3.1). vite.config.ts:plugins: [viteReact(), redact()].- Render any component that imports
Canvasfrom@react-three/fiber.
Expected: the canvas mounts. Actual: the error above at import time; Storybook and Vitest, which do not run the plugin, render the same component fine.
What I tried
skip is global per specifier, so there is no way to leave one package (or one subtree) on real React while the rest of the app uses Redact. Removing the plugin fixes it.
Ask
Either expose the client internals that react-reconciler needs so custom renderers can host their own root inside a Redact tree, or document that react-reconciler renderers (@react-three/fiber, @react-pdf/renderer, ink) are out of scope and let skip exclude an importer, not only a specifier.
- 主要语言
- TypeScript
- 星标
- 537
- 派生
- 22
- 平均合并
- 10 小时 27 分钟
- 30 天内合并 PR
- 40
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/redact 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 54/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
vercel-labs/durable-harness#53 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
area/docs area/ui enhancement
难度 1/5 1-3 小时 新手友好度 88/100
melgarafael/DeskcommCRM#4098 ·
维护者通常 1 天内回复
-
bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 86/100
kerti/balances-v2#801 ·
维护者通常 1 天内回复
-
lesson-submission pending-review
难度 1/5 1 小时以内 新手友好度 84/100
Ikalus1988/MisakaNet#4510 ·
维护者通常 1 天内回复