SyntaxError: Unexpected token < in JSON at position 0

I’am trying to load GLTF model of parrot. I downloaded the model and I imported a GLTFLoader. When I try to create a GLTFLoader it says:

On my server I’am using parcel.js
It’s interesting that on the codesandbox it is working properly…

Maybe it’s something wrong with parcel?
Do you know what am I doing wrong?


This error usually appears if the HTTP request for the glTF asset returns a HTML site. I suggest you open the asset URL directly in your browser and check the content.

Hi thanks for help!
But I’am big noob :smile: did you mean it like that?

Bcs I have still same error. Even in my network there isn’t any fail:

Can you please post a screenshot of the HTTP response data of Parrot.glb?

Of course

Yep, that’s the problem. Your web server does not serve a glb but HTML content.

1 Like

I understand the problem but how can i fix it ? Is changing the web server the only way or is there other things that i can do ?

I would ask a question to the folks who develop the respective web server.

1 Like