Unable to build, built in Aug 2019 but failing now @ionic/core/dist/types/utils/overlays.d.ts

ionic cordova build android

ionic-app-scripts build --target cordova --platform android
[16:56:43] ionic-app-scripts 2.0.2
[16:56:43] build dev started …
[16:56:43] clean started …
[16:56:43] clean finished in 2 ms
[16:56:43] copy started …
[16:56:43] transpile started …
[16:56:53] typescript: …xxx/node_modules/@ionic/core/dist/types/utils/overlays.d.ts, line: 19
‘>’ expected.

  L18:  export declare const modalController: {
  L19:      create(options: ModalOptions<import("../interface").ComponentRef>): Promise<HTMLIonModalElement>;
  L20:      dismiss(data?: any, role?: string | undefined, id?: string | undefined): Promise<boolean>;

        Parameter declaration expected.

  L18:  export declare const modalController: {

[16:56:53] typescript: …tunitytriangle/ot_mobile/node_modules/@ionic/core/dist/types/utils/overlays.d.ts, line: 19
[16:56:53] typescript: …tunitytriangle/ot_mobile/node_modules/@ionic/core/dist/types/utils/overlays.d.ts, line: 19
[16:56:53] typescript: …tunitytriangle/ot_mobile/node_modules/@ionic/core/dist/types/utils/overlays.d.ts, line: 19

ionic info
√ Gathering environment info - done!

Ionic:

ionic (Ionic CLI) : 4.1.2
Ionic Framework : ionic-angular 3.5.3
@ionic/app-scripts : 2.0.2

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : no whitelisted plugins (13 plugins total)

System:

NodeJS : v10.15.2 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

{
“name”: “xxx”,
“version”: “0.0.0”,
“author”: “xxx”,
“homepage”: “xxx”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
@angular/common”: “4.1.3”,
@angular/compiler”: “4.1.3”,
@angular/compiler-cli”: “4.1.3”,
@angular/core”: “4.1.3”,
@angular/forms”: “4.1.3”,
@angular/http”: “4.1.3”,
@angular/platform-browser”: “4.1.3”,
@angular/platform-browser-dynamic”: “4.1.3”,
@ionic-native/app-preferences”: “^4.16.0”,
@ionic-native/camera”: “^4.15.0”,
@ionic-native/core”: “^4.4.2”,
@ionic-native/diagnostic”: “^4.7.0”,
@ionic-native/file”: “^5.15.0”,
@ionic-native/file-transfer”: “^5.15.0”,
@ionic-native/in-app-browser”: “^5.15.0”,
@ionic-native/media”: “^4.7.0”,
@ionic-native/media-capture”: “^4.4.2”,
@ionic-native/splash-screen”: “3.12.1”,
@ionic-native/status-bar”: “3.12.1”,
@ionic-native/video-player”: “^4.4.2”,
@ionic/angular”: “^4.11.1”,
@ionic/storage”: “2.0.1”,
@ng-bootstrap/ng-bootstrap”: “^3.3.0”,
“angular2-http-interceptor”: “^4.0.0”,
“angular2-toaster”: “^6.1.0”,
“clean”: “^4.0.2”,
“cordova-android”: “^7.1.4”,
“cordova-ios”: “4.5.5”,
“cordova-plugin-app-preferences”: “git+https://github.com/apla/me.apla.cordova.app-preferences.git”,
“cordova-plugin-camera”: “^4.1.0”,
“cordova-plugin-compat”: “^1.2.0”,
“cordova-plugin-console”: “^1.1.0”,
“cordova-plugin-device”: “^1.1.7”,
“cordova-plugin-exoplayer”: “^2.5.4”,
“cordova-plugin-file”: “^5.0.0”,
“cordova-plugin-hotspot”: “^1.2.10”,
“cordova-plugin-media-capture”: “^2.0.0”,
“cordova-plugin-screensize”: “^1.3.1”,
“cordova-plugin-splashscreen”: “^4.1.0”,
“cordova-plugin-statusbar”: “^2.4.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“cordova.plugins.diagnostic”: “^3.9.2”,
“ionic”: “^4.1.2”,
“ionic-angular”: “3.5.3”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionic-selectable”: “^4.4.1”,
“ionicons”: “3.0.0”,
“recordrtc”: “^5.4.1”,
“rxjs”: “5.4.0”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.12”
},
“devDependencies”: {
@ionic/app-scripts”: “^2.0.2”,
“typescript”: “^2.3.4”
},
“cordovaPlugins”: [
“cordova-plugin-whitelist”,
“cordova-plugin-console”,
“cordova-plugin-statusbar”,
“cordova-plugin-device”,
“cordova-plugin-splashscreen”,
“ionic-plugin-keyboard”
],
“cordovaPlatforms”: [
“ios”,
{
“platform”: “ios”,
“version”: “”,
“locator”: “ios”
}
],
“description”: “xxx”,
“cordova”: {
“plugins”: {
“cordova-plugin-console”: {},
“cordova-plugin-device”: {},
“cordova-plugin-exoplayer”: {},
“cordova-plugin-file”: {},
“cordova-plugin-media-capture”: {},
“cordova-plugin-screensize”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-whitelist”: {},
“ionic-plugin-keyboard”: {},
“cordova.plugins.diagnostic”: {},
“cordova-plugin-hotspot”: {},
“cordova-plugin-camera”: {},
“cordova-plugin-app-preferences”: {}
},
“platforms”: [
“ios”
]
}
}

Seems like modal is being dismissed wrong. Check your whole project for how your modals is being dismissed.

Much more fundamental problem than dismissing modals, and frankly I’m shocked that this project ever built in its current state. The dependencies are a tangled mess of incompatible versions of things spread out over several years. I would suggest starting a new project from scratch and parachuting the app code from this old project into it. There will likely be lots of changes to the app code required. If you don’t want to do that, revert everything back to the last known building version, because that package.json as posted here is going to be hard to fix by hand.

Thanks for your responses. You are indeed right rapropos, but I managed to fix the dependencies manually by comparing with another similar app developed at around the same time.