RC3 - error "build dev failed: Cannot read property 'indexOf' of undefined

Hi,
i have this error :
"build dev failed: Cannot read property ‘indexOf’ of undefined "

when i use “ionic serve”

but if i run “ionic build browser”, everything is ok.

I’ve removed all my node_modules and do a fresh “npm install”.
I’ve deleted the “.tmp” & “www” dir too, but the error still displaying.

Please can you help me ? Thanks you,
best regards

This is my ionic info :

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.45
ios-deploy version: 1.9.0
ios-sim version: 5.0.11
OS: OS X El Capitan
Node Version: v6.7.0
Xcode version: Xcode 8.1 Build version 8B62

and my package.json :

{
“name”: “H2EAU_Mesures”,
“author”: “Benjamin MARCHAND - Key-conseil.fr”,
“homepage”: “http://techique.h2eauassistance.com”,
“private”: true,
“scripts”: {
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“config”: {
“ionic_bundler”: “webpack”
},
“dependencies”: {
@angular/common”: “2.1.1”,
@angular/compiler”: “2.1.1”,
@angular/compiler-cli”: “2.1.1”,
@angular/core”: “2.1.1”,
@angular/forms”: “2.1.1”,
@angular/http”: “2.1.1”,
@angular/platform-browser”: “2.1.1”,
@angular/platform-browser-dynamic”: “2.1.1”,
@angular/platform-server”: “2.1.1”,
@ionic/cloud-angular”: “^0.7.0”,
@ionic/storage”: “1.1.6”,
@types/lodash”: “4.14.38”,
“angular2-google-maps”: “0.16.0”,
“angular2-jwt”: “0.1.25”,
“angular2-uuid”: “1.1.0”,
“intl”: “^1.2.5”,
“ionic-angular”: “2.0.0-rc.3”,
“ionic-native”: “2.2.3”,
“ionicons”: “3.0.0”,
“lodash”: “4.17.0”,
“rxjs”: “5.0.0-beta.12”,
“zone.js”: “^0.6.26”
},
“devDependencies”: {
@ionic/app-scripts”: “0.0.45”,
“typescript”: “2.0.6”
},
“cordovaPlugins”: [
“cordova-plugin-device”,
“cordova-plugin-console”,
“cordova-plugin-whitelist”,
“cordova-plugin-splashscreen”,
“cordova-plugin-statusbar”,
“ionic-plugin-keyboard”,
“uk.co.workingedge.phonegap.plugin.launchnavigator”
],
“cordovaPlatforms”: [
“ios”,
{
“platform”: “ios”,
“version”: “”,
“locator”: “ios”
}
],
“description”: “H2EAU Mesures”
}

1 Like

Ok, i’ve find it : my typings/index.d.ts have some old typings, i remove the lines and everything is ok.
This is how i found the bug : i compiled manually my .ts and i see the error output from the compiler.

1 Like