# Rollup problem using external module on ionic 2 RC0

**URL:** <https://forum.ionicframework.com/t/rollup-problem-using-external-module-on-ionic-2-rc0/65339>\
**Category:** ionic-v3\
**Created:** [October 1, 2016, 2:10pm UTC](https://forum.ionicframework.com/t/rollup-problem-using-external-module-on-ionic-2-rc0/65339 "2016-10-01T14:10:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![symphony86](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@symphony86](https://forum.ionicframework.com/u/symphony86)\
**Post date:** [October 1, 2016, 2:10pm UTC](https://forum.ionicframework.com/t/rollup-problem-using-external-module-on-ionic-2-rc0/65339/1 "2016-10-01T14:10:56Z")

</div>

Referring to my previous post, I was having problem to import an external npm modules into my app…

> [@How to work with new npm @types](https://forum.ionicframework.com/t/how-to-work-with-new-npm-types/65336):
>
> Ive been working the whole day upgrading my app to the latest ionic with angular final… Since ionic moving from typings to npm @types, none of my library seems to work… for example, I was using asyncjs… so, I have installed both async and @types/async from npm… but, now i get this error instead… Export 'waterfall' is not defined by '.tmp/app/app.component.js' Is there anything missing?

Turn out, the error is actually related to rollup (so, ionic decided to use rollup instead of webpack)

Im using several external module like asyncjs and importing the module using

`import * as async from 'async'`

but then, during compilation, i get these errors spewed into my terminal…

```
[21:57:59] rollup: Export 'parallel' is not defined by '/my-app/.tmp/app/app.component.js'
[21:57:59] rollup: Export 'defer' is not defined by '/my-app/.tmp/pages/authentication/main/main.js'
[21:57:59] rollup: Export 'waterfall' is not defined by '/my-app/.tmp/pages/authentication/main/main.js'

```

Anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![symphony86](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@symphony86](https://forum.ionicframework.com/u/symphony86)\
**Post date:** [October 1, 2016, 2:41pm UTC](https://forum.ionicframework.com/t/rollup-problem-using-external-module-on-ionic-2-rc0/65339/2 "2016-10-01T14:41:20Z")

</div>

Ok… i found the solution, it seems that i supposed to import and assign to some variable (a different one from the module name) right away… although it looks kind of counterintuitive…

instead of this, which will throw error

`import * as async from 'async'`

this works

`import myasynclib from 'async'`

its weird… common sense dictate that this sounds like importing myasynclib out of async… but instead, it import async and assign to a variable called myasynclib… hurm…

can anyone confirm this?

---

<div class="post-metadata">

**Author:** ![danielabbatt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/danielabbatt/32/103106_2.png) [@danielabbatt](https://forum.ionicframework.com/u/danielabbatt)\
**Post date:** [October 1, 2016, 5:16pm UTC](https://forum.ionicframework.com/t/rollup-problem-using-external-module-on-ionic-2-rc0/65339/3 "2016-10-01T17:16:18Z")

</div>

Well this worked for me too, so it’s definitely a solution. I was using ‘moment’ and had to do the same thing.
