pmndrs / gltfjsx

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

TypeError: Cannot read properties of null (reading 'getCount') #217

Open janvarsa opened 11 months ago

janvarsa commented 11 months ago

Using the model shown here results in the following error:

Command: npx gltfjsx choshi-otaki_falls_oirase_valley_aomori.glb --transform

Output:


prune: No unused properties found.
reorder: No qualifying primitives found; may need to weld first.
instance: No meshes with ≥5 parent nodes were found.
prune: Removed types... Node (2)
prune: Removed types... Mesh (192), Node (192), Primitive (772), Accessor (579)
prune: No unused properties found.
TypeError: Cannot read properties of null (reading 'getCount')
    at weld (path/node_modules/@gltf-transform/functions/dist/functions.modern.js:1:19398)
    at vt.transform (path/node_modules/@gltf-transform/core/dist/core.modern.js:1:33370)
    at draco (path/node_modules/@gltf-transform/functions/dist/functions.modern.js:1:22817)
    at vt.transform (file:///C:/Users/jvars/AppData/Local/npm-cache/_npx/16b3f312213fced0/node_modules/@gltf-transform/core/dist/core.modern.js:1:33370)
    at async transform (path/node_modules/gltfjsx/src/utils/transform.js:108:3)
    at async WriteStream.<anonymous> (path/node_modules/gltfjsx/src/gltfjsx.js:56:11)```
janvarsa commented 11 months ago

Note above error came from v6.2.10; going back to v6.1.7 seems to work.

npx gltfjsx@6.1.7 choshi-otaki_falls_oirase_valley_aomori.glb --transform

rogersanick commented 10 months ago

I'm having the same issue

klingat commented 6 months ago

Thanks @janvarsa, that worked for me. Was having the same problem on latest version.