# Tween module not loading

**URL:** <https://discourse.threejs.org/t/tween-module-not-loading/10109>\
**Category:** Questions\
**Tags:** modules\
**Created:** [October 9, 2019, 8:09pm UTC](https://discourse.threejs.org/t/tween-module-not-loading/10109 "2019-10-09T20:09:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheDarkNord](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@TheDarkNord](https://discourse.threejs.org/u/TheDarkNord)\
**Post date:** [October 9, 2019, 8:09pm UTC](https://discourse.threejs.org/t/tween-module-not-loading/10109/1 "2019-10-09T20:09:50Z")

</div>

Hello there.

I am having a bit of trouble importing the tween.min.js module in my project. The location is correct, I have tested that. However, the moment I try and call the module, it says "Cannot read property “Tween” of undefined.

My file structure is:  
{  
file : {  
node\_modules: {  
three: {  
examples: {  
jsm: {  
libs: {  
tween.module.min.js  
}  
}  
}  
}  
}  
src: {  
index.html  
components: {  
main.js (Call to module is made from here)  
}  
}  
}  
}

```
import { TWEEN } from "../../node_modules/three/examples/jsm/libs/tween.module.min";
let newTween = new TWEEN.Tween(startPos).to(endPos, 2000);

```

Any thoughts? suggestions?

---

<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:** [October 9, 2019, 8:45pm UTC](https://discourse.threejs.org/t/tween-module-not-loading/10109/2 "2019-10-09T20:45:15Z")

</div>

The `libs` directory is not included in the `three` npm package. Please use the official package of `tween.js`:

> **[@tweenjs/tween.js](https://www.npmjs.com/package/@tweenjs/tween.js)**
>
> Super simple, fast and easy to use tweening engine which incorporates optimised Robert Penner's equations.

---

<div class="post-metadata">

**Author:** ![TheDarkNord](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@TheDarkNord](https://discourse.threejs.org/u/TheDarkNord)\
**Post date:** [October 10, 2019, 7:21am UTC](https://discourse.threejs.org/t/tween-module-not-loading/10109/3 "2019-10-10T07:21:48Z")

</div>

Ah! That clarifies. Thank you very much! Have a great day!
