# GLTFLoader - 404 not found

**URL:** <https://discourse.threejs.org/t/gltfloader-404-not-found/16804>\
**Category:** Questions\
**Tags:** gltf-loader\
**Created:** [July 6, 2020, 7:17am UTC](https://discourse.threejs.org/t/gltfloader-404-not-found/16804 "2020-07-06T07:17:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krystian](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/krystian/32/5942_2.png) [@Krystian](https://discourse.threejs.org/u/Krystian)\
**Post date:** [July 6, 2020, 7:17am UTC](https://discourse.threejs.org/t/gltfloader-404-not-found/16804/1 "2020-07-06T07:17:15Z")

</div>

Hello,

I’ve got problems with gltf loader. I have a problems with loading local glb file. I’m using angular.  
I am using this sample code:

```auto
import * as THREE from 'three';
import GLTFLoader from 'three-gltf-loader';
 
const loader = new GLTFLoader();
loader.load(
    'path/to/your/file.gltf',
    ( gltf ) => {
        // called when the resource is loaded
        scene.add( gltf.scene );
    },
    ( xhr ) => {
        // called while loading is progressing
        console.log( `${( xhr.loaded / xhr.total * 100 )}% loaded` );
    },
    ( error ) => {
        // called when loading has errors
        console.error( 'An error happened', error );
    },
);

```

when I use path like [https://rawcdn.githack.com/mrdoob/three.js/7249d12dac2907dac95d36227d62c5415af51845/examples/models/gltf/Flamingo.glb](https://rawcdn.githack.com/mrdoob/three.js/7249d12dac2907dac95d36227d62c5415af51845/examples/models/gltf/Flamingo.glb)

It is working without any problems.  
But when I download this file and put it into /src/Flamingo.glb then I use url like: ‘[http://localhost:4200/flamingo.glb](http://localhost:4200/flamingo.glb)’ or './Flamingo.glb it doesn’t work.  
In console there is an error: GET [http://localhost:4200/flamingo.glb](http://localhost:4200/flamingo.glb) 404 (Not Found)  
I have no idea what could be wrong

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Krystian](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/krystian/32/5942_2.png) [@Krystian](https://discourse.threejs.org/u/Krystian)\
**Post date:** [July 6, 2020, 8:47am UTC](https://discourse.threejs.org/t/gltfloader-404-not-found/16804/2 "2020-07-06T08:47:17Z")

</div>

I found solution. Maybe someone will have similar problem.  
I put my file into assets folder and then use url :’…/…/assets/flamingo.glb’

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [July 6, 2020, 8:50am UTC](https://discourse.threejs.org/t/gltfloader-404-not-found/16804/3 "2020-07-06T08:50:57Z")

</div>

> [@Krystian](#):
>
> `import GLTFLoader from 'three-gltf-loader';`

Please do not use `three-gltf-loader`. Always import the loader and other examples files from the `three` package like so:

```js
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';

```

---

<div class="post-metadata">

**Author:** ![Sujay\_Shanbhag](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/sujay_shanbhag/32/38063_2.png) [@Sujay\_Shanbhag](https://discourse.threejs.org/u/Sujay_Shanbhag)\
**Post date:** [July 12, 2023, 4:09pm UTC](https://discourse.threejs.org/t/gltfloader-404-not-found/16804/4 "2023-07-12T16:09:11Z")

</div>

Hey there, do not know if you will see this, But I desperately hope you do. I have the same problem, it loads from external links. I tried your solution and wrote …/…/assets/models/burger.gltf. It didnt work. Was I not supposed to type …?

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [July 12, 2023, 4:13pm UTC](https://discourse.threejs.org/t/gltfloader-404-not-found/16804/5 "2023-07-12T16:13:20Z")

</div>

1. Do not use three-gltf-loader package. Import GLTFLoader directly from three package (three/examples/jsm/loaders/GLTFLoader.)
2. Make sure the path you pass to the loader is correctly pointing to assets on your webserver (local or remote) - there’s no point in copying someone else’s paths, since they always depend on your own project structure.

---

<div class="post-metadata">

**Author:** ![Daniel\_testing](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/daniel_testing/32/41021_2.png) [@Daniel\_testing](https://discourse.threejs.org/u/Daniel_testing)\
**Post date:** [June 18, 2024, 3:27pm UTC](https://discourse.threejs.org/t/gltfloader-404-not-found/16804/6 "2024-06-18T15:27:08Z")

</div>

did you find a solution?
