# Error when using Pubnub angular2 module in Ionic 2

**URL:** <https://forum.ionicframework.com/t/error-when-using-pubnub-angular2-module-in-ionic-2/78313>\
**Category:** ionic-v3\
**Created:** [February 3, 2017, 1:52pm UTC](https://forum.ionicframework.com/t/error-when-using-pubnub-angular2-module-in-ionic-2/78313 "2017-02-03T13:52:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [February 4, 2017, 12:48am UTC](https://forum.ionicframework.com/t/error-when-using-pubnub-angular2-module-in-ionic-2/78313/2 "2017-02-04T00:48:34Z")

</div>

I’m not completely clear on the magical algorithm Webpack uses to find things, but it is possible you will need to try holding its hand here a bit. One thing you could try is to follow the instructions in [this post](https://forum.ionicframework.com/t/adding-custom-webpack-loaders-to-ionic2/77833/2?u=rapropos) to get a custom webpack configuration and try adding the following to it:

```auto
alias: {
  "pubnub-angular2": "pubnub-angular2/dist/pubnub-angular2.js"
}

```

---

_[View the full topic](https://forum.ionicframework.com/t/error-when-using-pubnub-angular2-module-in-ionic-2/78313)._
