# Getting error while using GLTFLoader

**URL:** <https://discourse.threejs.org/t/getting-error-while-using-gltfloader/27915>\
**Category:** Questions\
**Tags:** gltf-loader\
**Created:** [July 9, 2021, 1:05pm UTC](https://discourse.threejs.org/t/getting-error-while-using-gltfloader/27915 "2021-07-09T13:05:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![suneel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/suneel/32/19375_2.png) [@suneel](https://discourse.threejs.org/u/suneel)\
**Post date:** [July 9, 2021, 1:05pm UTC](https://discourse.threejs.org/t/getting-error-while-using-gltfloader/27915/1 "2021-07-09T13:05:11Z")

</div>

I am getting error while using GLTFLoader in my vue.js app.

Uncaught TypeError: three\_build\_three\_module\_js\_\_WEBPACK\_IMPORTED\_MODULE\_4\_\_.GLTFLoader is not a constructor

Steps to reproduce:

1. npm install three@0.130.1
2. import \* as THREE from “three/build/three.module.js”
3. use new THREE.GLTFLoader();

you’ll get error while using GLTFLoader method.

I want help on this. is there any other way t load gltf file…? please let me know.

Thanks in advance.

---

<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 9, 2021, 1:07pm UTC](https://discourse.threejs.org/t/getting-error-while-using-gltfloader/27915/2 "2021-07-09T13:07:36Z")

</div>

`GLTFLoader` is a separate module and no part of `three.module.js`. Try to import it like so:

```javascript
import * as THREE from 'three';
import { GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader.js';

```

And then create the loader instance like so:

```javascript
const loader = new GLTFLoader();

```

---

<div class="post-metadata">

**Author:** ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)\
**Post date:** [July 10, 2021, 12:15pm UTC](https://discourse.threejs.org/t/getting-error-while-using-gltfloader/27915/3 "2021-07-10T12:15:48Z")

</div>

Here you can find simple examples 🙂

From the [Collection of examples from discourse.threejs.org](https://discourse.threejs.org/t/collection-of-examples-from-discourse-threejs-org/4315)

[BeginnerExample](https://hofk.de/main/discourse.threejs/BeginnerExample/BeginnerExample.html)  
// … step 03: load 3D models - gltf

---

<div class="post-metadata">

**Author:** ![suneel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/suneel/32/19375_2.png) [@suneel](https://discourse.threejs.org/u/suneel)\
**Post date:** [July 15, 2021, 2:59am UTC](https://discourse.threejs.org/t/getting-error-while-using-gltfloader/27915/4 "2021-07-15T02:59:04Z")

</div>

It’s worked. Thanks😊
