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.
See original GitHub issuewhen 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)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Encountered Two Children with the Same Key — React Fix
Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
Read more >Two children with the same key in React - Stack Overflow
Application works, my classes really adds a new element but I see below warning in console! Warning: Encountered two children with the same...
Read more >Encountered two children with the same key (React)
Keys should be unique so that components maintain their identity across updates. * Non-unique keys may cause children to be duplicated and/or omitted...
Read more >Encountered two children with the same key, Keys ... - YouTube
How to solve Warning : Encountered two children with the same key, Keys should be unique so that components maintain their identity across...
Read more >Fix for Warning: Encountered two children with the same key ...
Warning : Encountered two children with the same key, `[object Object]`. Keys should be unique so that components maintain their identity across ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@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 😃