ionic-app-script task: "build" error

ionic-app-scripts build --prod --aot --minifyjs --minifycss --target cordova --platform android
[17:44:21] ionic-app-scripts 3.2.4
[17:44:21] build prod started …
[17:44:21] clean started …
[17:44:21] clean finished in 1 ms
[17:44:21] copy started …
[17:44:22] deeplinks started …
[17:44:22] deeplinks finished in 227 ms
[17:44:22] ngc started …
[17:44:23] ionic-app-script task: “build”
[17:44:23] TypeError: Object prototype may only be an Object or null: undefined
TypeError: Object prototype may only be an Object or null: undefined
at setPrototypeOf ()
at Object.__extends (/Users/user/ionic/homecargo/node_modules/tslib/tslib.js:65:9)
at /Users/user/ionic/homecargo/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/template.js:115:17
at /Users/user/ionic/homecargo/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/template.js:314:6
at /Users/user/ionic/homecargo/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/template.js:3:17
at Object. (/Users/user/ionic/homecargo/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/template.js:9:3)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
[ERROR] An error occurred while running subprocess ionic-app-scripts.

    ionic-app-scripts build --prod --aot --minifyjs --minifycss --target cordova --p... exited with exit code 1.

Please post package.json. If you manually upgraded core dependencies like Angular or RxJS, roll those updates back, remove node_modules, rerun npm i and see if the problem persists.