question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

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)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
SiegeSailorcommented, Jan 17, 2021

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.

2reactions
ghostcommented, Jan 12, 2021

@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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found