ionic-team / ionic-team/ionic-cli
Ionic 3 - app-scripts 3.2.4 getting Cannot read property 'flags' of undefined
- 主要語言
- 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