Open synergyseeker opened 2 years ago
edit: You don't get the issue at all if you install gltfjsx globally instead of using npx. I'm not sure why wiping my npx cache alone didn't solve it too.
npm i -g gltfjsx
As a temporary workaround, I've found that an older version of gltfjsx run on the same file works as expected.
npx gltfjsx@4.2.0 model.gltf
That version isn't necessarily the latest one that doesn't have this issue, but it is one that worked. I didn't try them all.
i think i have to remove ink, it's probably not worth it just so have some colored console output.
edit: You don't get the issue at all if you install gltfjsx globally instead of using npx. I'm not sure why wiping my npx cache alone didn't solve it too.
npm i -g gltfjsx
As a temporary workaround, I've found that an older version of gltfjsx run on the same file works as expected.
npx gltfjsx@4.2.0 model.gltf
That version isn't necessarily the latest one that doesn't have this issue, but it is one that worked. I didn't try them all.
Thank you. It worked for me!
That didn't work for me. :-\
This also didn't work for me as well. After hours of trying to nvm different versions, removing and re-installing npm, nvm, node... ect I still get this error. Powershell, gitbash, cmd... I used the online converter which worked but this drove me nuts to figure out.
I finally was able to solve it. For me it was my file location, my directory had a file location with space in it and some other issue the shell didn't like. I move the file to my desktop and the conversion worked. So I would try that @jeffscottward
When running npx gltfjsx Model.gltf against any gltf model it fails. It returns this Error.
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:
-throwOnInvalidObje (/Users/richardmattka/.npm/_npx/16b3f312213fced0/node_modu ctType les/react-reconciler/cjs/react-reconciler.development.js:45 24:15) -createChil (/Users/richardmattka/.npm/_npx/16b3f312213fced0/node_modules/reac t-reconciler/cjs/react-reconciler.development.js:4757:7) -reconcileChildren (/Users/richardmattka/.npm/_npx/16b3f312213fced0/node_modul rray es/react-reconciler/cjs/react-reconciler.development.js:5008 :25) -reconcileChildFi (/Users/richardmattka/.npm/_npx/16b3f312213fced0/node_module ers s/react-reconciler/cjs/react-reconciler.development.js:5374:1 4) -reconcileChild (/Users/richardmattka/.npm/_npx/16b3f312213fced0/node_modules/ en react-reconciler/cjs/react-reconciler.development.js:7865:28) -updateHostCompo (/Users/richardmattka/.npm/_npx/16b3f312213fced0/node_modules ent /react-reconciler/cjs/react-reconciler.development.js:8387:3)
-beginWork$ (/Users/richardmattka/.npm/_npx/16b3f312213fced0/node_modules/reac t-reconciler/cjs/react-reconciler.development.js:9969:14) -Object.invokeGuardedCa (/Users/richardmattka/.npm/npx/16b3f312213fced0/node lbackImpl modules/react-reconciler/cjs/react-reconciler.developme nt.js:11563:10) -invokeGuardedCal (/Users/richardmattka/.npm/_npx/16b3f312213fced0/node_module back s/react-reconciler/cjs/react-reconciler.development.js:11740: 31) -beginWork$ (/Users/richardmattka/.npm/_npx/16b3f312213fced0/node_modules/reac 1 t-reconciler/cjs/react-reconciler.development.js:15778:7)