# Compile project with BabylonJs failed with error: Cannot find module 'babylonjs/Animations' or its corresponding type declarations

**URL:** https://forum.babylonjs.com/t/compile-project-with-babylonjs-failed-with-error-cannot-find-module-babylonjs-animations-or-its-corresponding-type-declarations/48593
**Category:** Bugs
**Created:** [March 7, 2024, 12:24pm UTC](https://forum.babylonjs.com/t/compile-project-with-babylonjs-failed-with-error-cannot-find-module-babylonjs-animations-or-its-corresponding-type-declarations/48593 "2024-03-07T12:24:49Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Mikhay](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@Mikhay](https://forum.babylonjs.com/u/Mikhay)
#### Post date: [March 7, 2024, 12:24pm UTC](https://forum.babylonjs.com/t/compile-project-with-babylonjs-failed-with-error-cannot-find-module-babylonjs-animations-or-its-corresponding-type-declarations/48593/1 "2024-03-07T12:24:49Z")

</div>

Hi!

We are trying to upgrade to the new version of the library 6.45.1 and are trying to compile the project. We get several errors in the library itself. Please tell me what could be the reasons for such errors.

> Error: node\_modules/babylonjs/babylon.module.d.ts:29437:28 - error TS2307: Cannot find module ‘babylonjs/Animations’ or its corresponding type declarations.
> 
> 29437 import { Animatable } from “babylonjs/Animations”;  
> ~~~~~~~~~~~~~~~~~~~~~~
> 
> Error: node\_modules/babylonjs/babylon.module.d.ts:29557:28 - error TS2307: Cannot find module ‘babylonjs/Animations’ or its corresponding type declarations.
> 
> 29557 import { Animatable } from “babylonjs/Animations”;  
> ~~~~~~~~~~~~~~~~~~~~~~
> 
> Error: node\_modules/babylonjs/babylon.module.d.ts:73629:43 - error TS2552: Cannot find name ‘DecoderModule’. Did you mean ‘NodeModule’?
> 
> 73629 export function decodeMesh(decoderModule: DecoderModule, data: Int8Array, attributes: {  
> ~~~~~~~~~~~~~
> 
> Error: node\_modules/babylonjs/babylon.module.d.ts:99172:30 - error TS2307: Cannot find module ‘babylonjs/Physics/v2’ or its corresponding type declarations.
> 
> 99172 import { PhysicsShape } from “babylonjs/Physics/v2”;  
> ~~~~~~~~~~~~~~~~~~~~~~
> 
> Error: node\_modules/babylonjs/babylon.module.d.ts:99900:29 - error TS2307: Cannot find module ‘babylonjs/Physics/v2’ or its corresponding type declarations.
> 
> 99900 import { PhysicsBody } from “babylonjs/Physics/v2”;  
> ~~~~~~~~~~~~~~~~~~~~~~
> 
> Error: node\_modules/babylonjs/babylon.module.d.ts:194203:47 - error TS2552: Cannot find name ‘DecoderModule’. Did you mean ‘NodeModule’?
> 
> 194203 export function decodeMesh(decoderModule: DecoderModule, data: Int8Array, attributes: {  
> ~~~~~~~~~~~~~

---

<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: [March 7, 2024, 2:45pm UTC](https://forum.babylonjs.com/t/compile-project-with-babylonjs-failed-with-error-cannot-find-module-babylonjs-animations-or-its-corresponding-type-declarations/48593/2 "2024-03-07T14:45:39Z")

</div>

checking! thanks for reporting! 🙂

---

<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: [March 8, 2024, 10:51pm UTC](https://forum.babylonjs.com/t/compile-project-with-babylonjs-failed-with-error-cannot-find-module-babylonjs-animations-or-its-corresponding-type-declarations/48593/3 "2024-03-08T22:51:09Z")

</div>



---

<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: [March 11, 2024, 11:36am UTC](https://forum.babylonjs.com/t/compile-project-with-babylonjs-failed-with-error-cannot-find-module-babylonjs-animations-or-its-corresponding-type-declarations/48593/4 "2024-03-11T11:36:26Z")

</div>

Will be fixed in the next version:

[Fix UMD declaration and add project to test by RaananW · Pull Request #14855 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/14855)

---

<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: [March 11, 2024, 11:36am UTC](https://forum.babylonjs.com/t/compile-project-with-babylonjs-failed-with-error-cannot-find-module-babylonjs-animations-or-its-corresponding-type-declarations/48593/5 "2024-03-11T11:36:29Z")

</div>



---

<div class="post-metadata">

### Author: ![Mikhay](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@Mikhay](https://forum.babylonjs.com/u/Mikhay)
#### Post date: [March 13, 2024, 11:02am UTC](https://forum.babylonjs.com/t/compile-project-with-babylonjs-failed-with-error-cannot-find-module-babylonjs-animations-or-its-corresponding-type-declarations/48593/6 "2024-03-13T11:02:46Z")

</div>

Hi

There is one bug left in version 4.6.1

> Error: node\_modules/babylonjs/babylon.module.d.ts:99903:29 - error TS2307: Cannot find module ‘babylonjs/Physics/v2’ or its corresponding type declarations.
> 
> 99903 import { PhysicsBody } from “babylonjs/Physics/v2”;  
> ~~~~~~~~~~~~~~~~~~~~~~

if you add “physicsBody” to “babylonjs/Physics/v2”, then the project compiles successfully

---

<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: [March 13, 2024, 2:20pm UTC](https://forum.babylonjs.com/t/compile-project-with-babylonjs-failed-with-error-cannot-find-module-babylonjs-animations-or-its-corresponding-type-declarations/48593/7 "2024-03-13T14:20:19Z")

</div>

~~that was fixed in a recent PR, but let me check again. Are you sure the version you are referencing is correct? or do you mean 6.46.1?~~

Sorry about that - I will release a patch very soon.
