Module build failed


Has anyone seen these kind of errors?

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

I am getting the following errors.

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…

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?)

1 Like

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

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

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 :slight_smile: . There is a plan to change that in the future. Can’t say exactly when…

"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?

1 Like

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


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 :frowning:

I will gladly share PlayGround examples when I can.

Thanks a lot for your help!