ionic-team / ionic-team/ionic-cli

Ionic 3 - app-scripts 3.2.4 getting Cannot read property 'flags' of undefined

Aperta
#4,668 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
triage
Lingua principale
TypeScript
Stelle
2k
Fork
682
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Description:**
My company's Ionic v3 apps being rewritten to native.
In preparation for that wanted to use the firebase config plugin. Have to have cordov 9.0 and newer version of nodejs. Updated both of those.

After installing a bunch of modules (semver, shelljs, tslib) can build dev version fine.
But building with the --prod flag get error.
TypeError: Cannot read property 'flags' of undefined

Google brought me to
https://github.com/ionic-team/ionic-cli/issues/2921
installed "@ionic/app-scripts": "^3.2.4"

Still getting the same problem.

Steps:
Delete node_modules
Delete package.lock

Install node modules
Add remove Android
Build for dev fine
Build for prod fails.

**Output:**
```
Running app-scripts build: --prod --platform android --target cordova
[13:39:39] build prod started ...
[13:39:39] clean started ...
[13:39:39] clean finished in 4 ms
[13:39:39] copy started ...
[13:39:39] deeplinks started ...
[13:39:39] deeplinks finished in 99 ms
[13:39:39] ngc started ...
TypeError: Cannot read property 'flags' of undefined
at checkUnreachable (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:24905:31)
at bindChildrenWorker (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:23111:17)
at bindChildren (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:23055:17)
at bind (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:24319:21)
at bindSourceFile (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:22689:17)
at Object.bindSourceFile (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:22640:9)
at initializeTypeChecker (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:47988:20)
at Object.createTypeChecker (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:27142:9)
at getDiagnosticsProducingTypeChecker (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:69678:93)
at emitWorker (/home/dev/Ionic-app/apps/gf-mobile-mobileapps/node_modules/typescript/lib/typescript.js:69722:32)
```

**My `ionic info`:**
```
cli packages: (/home/app/.npm-global/lib/node_modules)

@ionic/cli-utils : 1.19.3
ionic (Ionic CLI) : 3.20.1

global packages:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)

local packages:

@ionic/app-scripts : 3.2.4
Cordova Platforms : android 8.1.0
Ionic Framework : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node : v14.16.1
npm : 6.14.12
OS : Linux 4.15

Environment Variables:

ANDROID_HOME : /home/user/Android/Sdk

Misc:

backend : pro
```

The app is really in maintenance mode. Adding in firebase config to get users to update the app will most likely be the last update for it.
Thanks

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.