# Build dev failed: Cannot read property 'indexOf' of undefined

**URL:** <https://forum.ionicframework.com/t/build-dev-failed-cannot-read-property-indexof-of-undefined/71506>\
**Category:** ionic-v3\
**Created:** [November 28, 2016, 1:47am UTC](https://forum.ionicframework.com/t/build-dev-failed-cannot-read-property-indexof-of-undefined/71506 "2016-11-28T01:47:00Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![nilton\_felicio](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nilton_felicio/32/100637_2.png) [@nilton\_felicio](https://forum.ionicframework.com/u/nilton_felicio)\
**Post date:** [November 29, 2016, 2:59am UTC](https://forum.ionicframework.com/t/build-dev-failed-cannot-read-property-indexof-of-undefined/71506/17 "2016-11-29T02:59:17Z")

</div>

Shocoben, you’re my hero.

Good question. Why does angularfire2 install a firebase folder inside your node\_module?

The question:  
To use p firebase service (I never understood this either) we must install in that order:  
Npm install firebase angularfire2 --save

After Shocoben opened my eye: firebase is doubled.  
1 - within node\_module  
1 - within angularfire2 / node\_module

Solution:

In node\_module / angularfire2 / node\_module / =\> delete the firebase folder.

WORKED FOR ME - Thank you very much Shocoben

---

_[View the full topic](https://forum.ionicframework.com/t/build-dev-failed-cannot-read-property-indexof-of-undefined/71506)._
