ionic-team / ionic-team/ionic-cli

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

オープン
#4,668 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
triage
主要言語
TypeScript
スター
2k
フォーク
682
PR マージ指標
30日以内にマージされた PR はありません

説明

**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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Reproduce the reported `ionic build --prod --platform android` failure, comparing it with the successful development build. Start at the `ngc` stage and the TypeScript stack location `node_modules/typescript/lib/typescript.js:24905`; done means identifying the production-build compatibility failure and documenting or validating a supported resolution.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, nodejs, typescript
領域
build-system, cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。