Problem loading xbot.glb from examples locally

I just downloaded threejs-example´s models and want to load Xbot.glb locally (localhost). When doing exactly same same as in the example:

const loader = new GLTFLoader();|
loader.load( 'models/gltf/Xbot.glb', function ( gltf ) { console.log( "loaded") });

I´m getting an error in the console and the glb-file seems not to be loading:

index.js:1446 SyntaxError: Unexpected token < in JSON at position 0
at Object.parse ()
at GLTFLoader.parse (GLTFLoader.js:178)
at Object.onLoad (GLTFLoader.js:102)
at XMLHttpRequest. (three.module.js:30530)

Any help is highly appreciated

This error usually indicates that your backend does not correctly serve the glTF asset. Check out:

1 Like