gltfjsx
gltfjsx copied to clipboard
Warning: Encountered two children with the same key, ` in App`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
when i run > npx gltfjsx models/gltf/xbot.glb --root public/ --verbose`
i get this error
arning: Encountered two children with the same key, ` in App`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
in ink-box (created by Box)
in Box (created by ErrorOverview)
in ink-box (created by Box)
in Box (created by ErrorOverview)
in ErrorOverview (created by InternalApp)
in InternalApp
ERROR Objects are not valid as a React child (found: Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.). If you meant to render a collection of children, use an array instead.
in ink-text (created by Text)
in Text
in ink-box (created by Box)
in Box
in App
in App
in InternalApp
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
- 2. You might be breaking the Rules of Hooks
- 3. You might have more than one copy of React in the same app
- See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.). If you meant to render a collection of children, use an array instead.
- in ink-text (created by Text)
- in Text
- in ink-box (created by Box)
- in Box
- in App
- in App
- in InternalApp
- throwOnInvalidObjectType (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:4524:15)
- createChild (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:4757:7)
- reconcileChildrenArray (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:5008:25)
- reconcileChildFibers (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:5374:14)
- reconcileChildren (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:7865:28)
- updateHostComponent (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:8387:3)
- beginWork$1 (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:9969:14)
- Object.invokeGuardedCallbackImpl (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:11563:10)
- invokeGuardedCallback (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:11740:31)
- beginWork$$1 (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:15778:7)
could you append the glb?
https://github.com/mrdoob/three.js/blob/dev/examples/models/gltf/Xbot.glb its this one, just one of the standard threejs gltf models
cant reproduce unfortunately, runs through here :-(
I am also encountering the same problem when executing the same command with the model in this codesandbox public/stacy.glb
.
@drcmda i will do some work and put together a PR to try and make the error message less cryptic. let me know if you can provide any context / pointers otherwise ill get started on it later tonight. thank you :)
awesome! good luck also, i still can't reproduce :-(
After a few tests, I found out that the error I was encountering was because I installed the package locally. Everything is working well when I install it globally.
I can confirm. Got the same error when running locally, where installing globally fixed it.