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)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- developer-experience, frontend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 537
- Fork
- 22
- Merge trung bình
- 11 giờ 37 phút
- Pull request đã merge (30 ngày)
- 35
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/redact
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
TanStack/redact#142 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TanStack/redact
Issue tương tự
-
Report: &TV InternationalĐang mởcheck:passed streams:remove
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority-p1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
beginner blocked
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
hiero-ledger/hiero-sdk-js#4670 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.Đang mởMonthly Not a priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Expensify/App#106080 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày