# GLTF Loader Import causes three.module.js to fail importing

**URL:** <https://discourse.threejs.org/t/gltf-loader-import-causes-three-module-js-to-fail-importing/11588>\
**Category:** Questions\
**Tags:** gltf-loader, import\
**Created:** [December 16, 2019, 4:48am UTC](https://discourse.threejs.org/t/gltf-loader-import-causes-three-module-js-to-fail-importing/11588 "2019-12-16T04:48:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blazefirer](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@Blazefirer](https://discourse.threejs.org/u/Blazefirer)\
**Post date:** [December 16, 2019, 4:48am UTC](https://discourse.threejs.org/t/gltf-loader-import-causes-three-module-js-to-fail-importing/11588/1 "2019-12-16T04:48:42Z")

</div>

I have read a lot of posts but I can not get the GLTF Loader to import for the life of me. When I try loading in the one from [js](https://github.com/mrdoob/three.js/tree/dev/examples/js/loaders) it gives me the error SyntaxError: import not found: GLTFLoader. Then When I try loading in the ones from [jsm](https://github.com/mrdoob/three.js/tree/dev/examples/jsm/loaders) it gives the error message Loading failed for the module with source “file:///home/blaze/build/three.module.js”. It’s bugging me because I need to load GLTF objects for my project and I have tried reading a lot of posts on it and nothing seems to help. I have my three.module.js from the three dev branch as well to see if that would help. My HTML file is pretty long and needs to be refactored but here it’s [ProceduralCity.html](https://discourse.threejs.org/uploads/short-url/5AoGCqNE3D6Er5c5varxrTWUDL0.html) (45.5 KB) and here is jsfiddle link to it [https://jsfiddle.net/qkn7a18L/](https://jsfiddle.net/qkn7a18L/). here is picture to show how I set up my file structure ![fileSetup](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/c/c02692787460f8a44094e8384e0549db986d11aa.png).  
Hopefully, that helps with all my code and thanks to any help given 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:** [December 16, 2019, 11:40am UTC](https://discourse.threejs.org/t/gltf-loader-import-causes-three-module-js-to-fail-importing/11588/2 "2019-12-16T11:40:16Z")

</div>

I’ve update your fiddle so the dependencies are now loaded correctly (from the official `three.js` repository):

[https://jsfiddle.net/csfqmh4w/1/](https://jsfiddle.net/csfqmh4w/1/)

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [December 16, 2019, 4:18pm UTC](https://discourse.threejs.org/t/gltf-loader-import-causes-three-module-js-to-fail-importing/11588/3 "2019-12-16T16:18:00Z")

</div>

A minor thing, but I would advise trying to do imports from a versioned URL like [https://unpkg.com/three@0.108.0/examples/jsm/loaders/GLTFLoader.js](https://unpkg.com/three@0.108.0/examples/jsm/loaders/GLTFLoader.js) if you’re going to rely on a remote host for them.

---

<div class="post-metadata">

**Author:** ![Blazefirer](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@Blazefirer](https://discourse.threejs.org/u/Blazefirer)\
**Post date:** [December 20, 2019, 5:05am UTC](https://discourse.threejs.org/t/gltf-loader-import-causes-three-module-js-to-fail-importing/11588/4 "2019-12-20T05:05:06Z")

</div>

sorry of the late response but thanks @Mugen87 that worked perfectly
