Debug a ionic 2 app when build fails

Hi guys,

I’m new to ionic and I have an error coming and going during the build

build dev failed: Cannot read property 'indexOf' of undefined 

I say come and go because I have no clue where it comes from, and it seems to appear sometime and sometime not for the same code base.

It is also an understatement to say that this error message does not help, so I’m wondering. Where should I look at to try to understand where it wants to see this index of an undefined item ?

Thanks!