Getting a build failure when trying to build an ionic2 app for android.
$> ionic build android
[11:15:16] ionic-app-scripts 0.0.45
[11:15:16] build prod started ...
[11:15:16] clean started ...
[11:15:16] clean finished in 4 ms
[11:15:16] copy started ...
[11:15:16] ngc started ...
[11:15:17] copy finished in 286 ms
[11:15:38] TypeError: Cannot read property 'text' of undefined
[11:15:38] ngc failed
[11:15:38] ionic-app-script task: "build"
[11:15:38] Error: Error
Hi I had the same problem a few days back.
I’ve tried a few changes and it worked finally but I’m not sure which solved the problems.
I guess it happened after updating ionic-cli.
If so, you can try upgrading to the latest ionic-app-scripts also. You need to do some changes on the config files.
Another thing I did is simply removing all the caret symbols in package.json
I don’t know if this could help, but I read this somewhere.