"ionic:build": "ionic-app-scripts build --dev" works but not without --dev


Recently I experienced a weird problem. I’m developing usually with this line in my package.json:

“ionic:build”: “ionic-app-scripts build --dev”

This still works totally fine on my device. But when I remove the --dev parameter and run it on my device I’ll get a black screen after the Spashscreen and nothing happens.

On the chrome inspector I’ll get this error which doesn’t tell much and since the code is uglyfied it doesn’t show anything :smiley:

Uncaught TypeError: Cannot read property ‘prototype’ of undefined

I think this must have come with a recent update of the ionic cli, ionic framework or the app-scripts.

The versions I currently use:

Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.43
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.7.0
Xcode version: Not installed

Has someone an idea and can please help :slight_smile:

Ok, looks like it doesn’t have to do with any recent update.
So far I could narrow it down to this:

In one component I do this:

export class FirstClass extends SecondClass {

constructor() {

If I remove the extension it works perfectly fine. What is weird though, I extend the same SecondClass in 5 other components and it all works like a charm.

Also I’ve changed the build process of rollup so that it matches the one of the dev-build. But even then it didn’t work and was stuck after the splash screen. Which means there must be something else what happens if I use the --dev parameter.

Does someone know where I could keep searching?

Hi I got the same problem on iOS.
I got the error message when I build for iOS and --dev did help the build.

Uncaught TypeError: Cannot read property ‘text’ of undefined

There is no problems when I build for android without --dev flag.
And I don’t know how to track back the problem. Any help?