# Module build failed

**URL:** <https://forum.babylonjs.com/t/module-build-failed/22714>\
**Category:** Questions\
**Created:** [July 30, 2021, 5:17am UTC](https://forum.babylonjs.com/t/module-build-failed/22714 "2021-07-30T05:17:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DOEHOONLEE](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/doehoonlee/32/16289_2.png) [@DOEHOONLEE](https://forum.babylonjs.com/u/DOEHOONLEE)\
**Post date:** [July 30, 2021, 5:17am UTC](https://forum.babylonjs.com/t/module-build-failed/22714/1 "2021-07-30T05:17:13Z")

</div>

Hi!

Has anyone seen these kind of errors?

It seems like my project is not loading @babylon modules properly.

I am getting the following errors.

```auto
index.js:4 Uncaught Error: Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: ENOENT: no such file or directory

index.js:1437 ./node_modules/@babylonjs/loaders/node_modules/@babylonjs/core/Animations/animation.js
. 
.
.

```

I tried uninstalling the modules and redownloaded. Both @babylon core and loaders versions match.

It just stopped working at some point…

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 30, 2021, 8:46am UTC](https://forum.babylonjs.com/t/module-build-failed/22714/2 "2021-07-30T08:46:46Z")

</div>

that seems odd that the core dependency is coming from the loaders module.  
What dependency version(s) are you using? when did it work (and more importantly, when did it stop working?)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 30, 2021, 2:05pm UTC](https://forum.babylonjs.com/t/module-build-failed/22714/3 "2021-07-30T14:05:24Z")

</div>

Really looks like you have 2 different versions as it would normally dedup and end up in the main core folder.

---

<div class="post-metadata">

**Author:** ![brianzinn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/brianzinn/32/28013_2.png) [@brianzinn](https://forum.babylonjs.com/u/brianzinn)\
**Post date:** [July 30, 2021, 3:38pm UTC](https://forum.babylonjs.com/t/module-build-failed/22714/4 "2021-07-30T15:38:07Z")

</div>

It’s because `@babylonjs/core` is a direct dependency and not a peer dependency.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 30, 2021, 6:58pm UTC](https://forum.babylonjs.com/t/module-build-failed/22714/5 "2021-07-30T18:58:31Z")

</div>

If the versions match node should take care of that and not install the extra dependency. Though I do agree peer dependency would make more sense 🙂 . There is a plan to change that in the future. Can’t say exactly when…

---

<div class="post-metadata">

**Author:** ![DOEHOONLEE](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/doehoonlee/32/16289_2.png) [@DOEHOONLEE](https://forum.babylonjs.com/u/DOEHOONLEE)\
**Post date:** [August 1, 2021, 7:10am UTC](https://forum.babylonjs.com/t/module-build-failed/22714/6 "2021-08-01T07:10:07Z")

</div>

```auto
"dependencies": {
    "@babylonjs/core": "^4.2.0",
    "@babylonjs/loaders": "^4.2.0",

```

Hmm… isn’t this how they are supposed to look like?

By “dedup,” do you mean data deduplication?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [August 2, 2021, 1:35pm UTC](https://forum.babylonjs.com/t/module-build-failed/22714/7 "2021-08-02T13:35:57Z")

</div>

Yup this setup should work correctly, a simple repro on github might help ?

---

<div class="post-metadata">

**Author:** ![DOEHOONLEE](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/doehoonlee/32/16289_2.png) [@DOEHOONLEE](https://forum.babylonjs.com/u/DOEHOONLEE)\
**Post date:** [August 6, 2021, 4:29am UTC](https://forum.babylonjs.com/t/module-build-failed/22714/8 "2021-08-06T04:29:00Z")

</div>

Hmm… I have no idea what happened. I git cloned again then the new one did not work, but the original one started working again for some reason…

I am happy that it’s working, but so confused lol

I usually include PlayGround when posting, but this project includes some of the company’s codes that are not open to public ☹

I will gladly share PlayGround examples when I can.

Thanks a lot for your help!
