# Error: Could not load /models/testModel.glb: THREE.GLTFLoader: No DRACOLoader instance provided.)

**URL:** <https://discourse.threejs.org/t/error-could-not-load-models-testmodel-glb-three-gltfloader-no-dracoloader-instance-provided/51690>\
**Category:** Questions\
**Tags:** general\
**Created:** [May 17, 2023, 10:00am UTC](https://discourse.threejs.org/t/error-could-not-load-models-testmodel-glb-three-gltfloader-no-dracoloader-instance-provided/51690 "2023-05-17T10:00:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naeemgg](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/naeemgg/32/34713_2.png) [@Naeemgg](https://discourse.threejs.org/u/Naeemgg)\
**Post date:** [May 17, 2023, 10:00am UTC](https://discourse.threejs.org/t/error-could-not-load-models-testmodel-glb-three-gltfloader-no-dracoloader-instance-provided/51690/1 "2023-05-17T10:00:57Z")

</div>

Hi everyone! I’m trying to load a glb file `testModel.glb` in R3F like this:

```javascript
const Machine = (props)=>{
  const result = useLoader(GLTFLoader, '/models/testModel.glb')
  return <primitive object={result.scene} />
}

```

But getting thise error

```javascript
Unhandled Runtime Error

Error: Could not load /models/testModel.glb: THREE.GLTFLoader: No DRACOLoader instance provided.)

```

I dont know what DRACOLoader is so I tried something like this:

```javascript
const Machine = (props:any)=>{
  const result = useLoader(DRACOLoader, '/models/testModel.glb')
  return <primitive object={result.scene} />
}

```

but got this error in return :

```javascript
Unhandled Runtime Error

Error: Could not load /models/testModel.glb: fetch for "http://localhost:3000/draco_wasm_wrapper.js" responded with 404: Not Found)

```

What am I doing wrong here??

---

<div class="post-metadata">

**Author:** ![Lawrence3DPK](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/lawrence3dpk/32/29184_2.png) [@Lawrence3DPK](https://discourse.threejs.org/u/Lawrence3DPK)\
**Post date:** [May 17, 2023, 11:35am UTC](https://discourse.threejs.org/t/error-could-not-load-models-testmodel-glb-three-gltfloader-no-dracoloader-instance-provided/51690/2 "2023-05-17T11:35:20Z")

</div>

Draco loader will load .drc files not glb files, you need a GLTFLoader with an instance of draco loader attached to it as well as setting the wasm decoder path for the draco loader, something like this will work…

```javascript
const gltfLoader = new GLTFLoader();
const dracoLoader = new DRACOLoader();
dracoLoader.setDecoderPath( '../path/to/dracoDecoder/' );
gltfLoader.setDRACOLoader( dracoLoader );

```

I would have been sure r3f drei already handled draco compressed gltf/glb files in useGLTF but not entirely certain on this…

---

<div class="post-metadata">

**Author:** ![Naeemgg](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/naeemgg/32/34713_2.png) [@Naeemgg](https://discourse.threejs.org/u/Naeemgg)\
**Post date:** [May 17, 2023, 1:33pm UTC](https://discourse.threejs.org/t/error-could-not-load-models-testmodel-glb-three-gltfloader-no-dracoloader-instance-provided/51690/3 "2023-05-17T13:33:34Z")

</div>

How can I use its instance with R3F 🥲

---

<div class="post-metadata">

**Author:** ![Lawrence3DPK](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/lawrence3dpk/32/29184_2.png) [@Lawrence3DPK](https://discourse.threejs.org/u/Lawrence3DPK)\
**Post date:** [May 17, 2023, 2:09pm UTC](https://discourse.threejs.org/t/error-could-not-load-models-testmodel-glb-three-gltfloader-no-dracoloader-instance-provided/51690/4 "2023-05-17T14:09:18Z")

</div>

Try with useGLTF like this…

```javascript
import { useGLTF } from '@react-three/drei'

```

This should already allow draco compressed models to be loaded without the effort of doing it yourself… Have a look [here](https://sbcode.net/react-three-fiber/use-gltf/)
