Tencent / Tencent/tdesign-react
[LoadingIcon] Rspack 打包运行时报错
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 965
- Forks
- 373
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 17
Description
tdesign-react 版本
tdesign-icons-react 0.2.0
重现链接
No response
重现步骤
export default () => {
const loading = true;
if (loading) return ;
};
只要用到LoadingIcon就会报错,而是用vite则是正常的
期望结果
正常运行
实际结果
报错内容:
Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at removeChildFromContainer (http://localhost:8080/main.js:31368:24)
at commitDeletionEffectsOnFiber (http://localhost:8080/main.js:38567:48)
at recursivelyTraverseDeletionEffects (http://localhost:8080/main.js:38550:13)
at commitDeletionEffectsOnFiber (http://localhost:8080/main.js:38616:17)
at recursivelyTraverseDeletionEffects (http://localhost:8080/main.js:38550:13)
at commitDeletionEffectsOnFiber (http://localhost:8080/main.js:38616:17)
at commitDeletionEffects (http://localhost:8080/main.js:38542:9)
at recursivelyTraverseMutationEffects (http://localhost:8080/main.js:38691:17)
at commitMutationEffectsOnFiber (http://localhost:8080/main.js:38715:17)
at recursivelyTraverseMutationEffects (http://localhost:8080/main.js:38701:17)
(anonymous) @ react-dom.development.js:22839
callCallback @ react-dom.development.js:4164
invokeGuardedCallbackDev @ react-dom.development.js:4213
invokeGuardedCallback @ react-dom.development.js:4277
reportUncaughtErrorInDEV @ react-dom.development.js:22838
captureCommitPhaseError @ react-dom.development.js:27126
recursivelyTraverseMutationEffects @ react-dom.development.js:24261
commitMutationEffectsOnFiber @ react-dom.development.js:24293
recursivelyTraverseMutationEffects @ react-dom.development.js:24273
commitMutationEffectsOnFiber @ react-dom.development.js:24576
recursivelyTraverseMutationEffects @ react-dom.development.js:24273
commitMutationEffectsOnFiber @ react-dom.development.js:24576
recursivelyTraverseMutationEffects @ react-dom.development.js:24273
commitMutationEffectsOnFiber @ react-dom.development.js:24293
recursivelyTraverseMutationEffects @ react-dom.development.js:24273
commitMutationEffectsOnFiber @ react-dom.development.js:24293
recursivelyTraverseMutationEffects @ react-dom.development.js:24273
commitMutationEffectsOnFiber @ react-dom.development.js:24576
recursivelyTraverseMutationEffects @ react-dom.development.js:24273
commitMutationEffectsOnFiber @ react-dom.development.js:24293
recursivelyTraverseMutationEffects @ react-dom.development.js:24273
commitMutationEffectsOnFiber @ react-dom.development.js:24293
recursivelyTraverseMutationEffects @ react-dom.development.js:24273
commitMutationEffectsOnFiber @ react-dom.development.js:24432
commitMutationEffects @ react-dom.development.js:24243
commitRootImpl @ react-dom.development.js:26810
commitRoot @ react-dom.development.js:26682
finishConcurrentRender @ react-dom.development.js:25936
performConcurrentWorkOnRoot @ react-dom.development.js:25809
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
react_devtools_backend.js:2655 The above error occurred in the component:
at LoadingIcon
at _default (http://localhost:8080/main.js:151766:50)
at Router (http://localhost:8080/main.js:45230:21)
at BrowserRouter (http://localhost:8080/main.js:43975:11)
at Provider (http://localhost:8080/main.js:42500:21)
at App
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
框架版本
React 18.2.0
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the LoadingIcon example with Rspack and compare it with the reported working Vite setup. Inspect the LoadingIcon component and its tdesign-icons-react 0.2.0 integration, using the reported removeChild error to narrow the cause. Done means the example runs without the DOMException under Rspack.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100