GLTFLoader.js:2145 TypeError: Cannot read property ‘children’ of undefined

Description of the problem

Please help. I got below error when I tried to load a .gltf file. I used the sample code:

Also, here is the link of the files I used:

THREE.Object3D.add: object not an instance of THREE.Object3D. undefined
GLTFLoader.js:2145 Uncaught (in promise) TypeError: Cannot read property 'children' of undefined
    at buildNodeHierachy (GLTFLoader.js:2145)
    at buildNodeHierachy (GLTFLoader.js:2152)
    at GLTFLoader.js:2178
    at _each (GLTFLoader.js:604)
    at GLTFLoader.js:2166
    at <anonymous>
buildNodeHierachy @ GLTFLoader.js:2145
buildNodeHierachy @ GLTFLoader.js:2152
(anonymous) @ GLTFLoader.js:2178
_each @ GLTFLoader.js:u
(anonymous) @ GLTFLoader.js:2166

Thank you in advance.

Three.js version
  • Dev
  • r85
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)


Author: Fantashit

1 thought on “GLTFLoader.js:2145 TypeError: Cannot read property ‘children’ of undefined

  1. Hi @densetsughem — thanks for the details! You have a glTF1.0 model here, and we’re not supporting that much longer. Rather than try to debug what might be wrong with GLTFLoader or with the model, could you try making a glTF2.0 version?

    There is a new glTF Blender exporter that should help:

    To test glTF2.0 files in THREE.GLTF2Loader, you can drag-and-drop them here:

Comments are closed.