pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.5k stars 293 forks source link

Error : Objects are not valid as a React child #68

Closed dagatsoin closed 3 years ago

dagatsoin commented 3 years ago

Hi, first thanks for all your effort to bring real time 3d to the mass 👍

I am testing this model utils with this GLTFJSX. (the link is valid for a week)

Reproduction step:

Actual behavior:

Logs:

npx : 276 installé(s) en 19.537s

  ERROR  Objects are not valid as a React child (found: TypeError: Cannot read property '0' of null). If you meant to render a collection of children, use an array instead.
            in ink-text (created by Text)
            in Text (created by App)
            in ink-box (created by Box)
            in Box (created by App)
            in App (created by App)
            in App
            in InternalApp

 -     in ink-text (created by Text)
 -     in Text (created by App)
 -     in ink-box (created by Box)
 -     in Box (created by App)
 -     in App (created by App)
 -     in App
 -     in InternalApp
 - throwOnInvalidObjectType (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:4524:15)
 - createChild (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:4757:7)
 - reconcileChildrenArray (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:5008:25)
 - reconcileChildFibers (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:5374:14)
 - reconcileChildren (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:7865:28)
 - updateHostComponent (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:8387:3)
 - beginWork$1 (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:9969:14)
 - Object.invokeGuardedCallbackImpl (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:11563:10)
 - invokeGuardedCallback (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:11740:31)
 - beginWork$$1 (/Users/fraktar/.npm/_npx/71090/lib/node_modules/gltfjsx/node_modules/react-reconciler/cjs/react-reconciler.development.js:15778:7)
drcmda commented 3 years ago

could you check if you have an older version installed? either locally or globally?

dagatsoin commented 3 years ago

Found the problem. The extension may be mandatory in the command line. Works with npx gltfjsx ./bottle.glb -t