thisloke / ng2-fittext

An Angular2+ directive that autoscale the font size of an element until it fit the upper level container dimension.
MIT License
31 stars 15 forks source link

Prod Build > TypeError: Cannot read property 'kind' of undefined #43

Open KirstenStake opened 3 years ago

KirstenStake commented 3 years ago

Have seen this issue previously in the "closed" status, but without an answer, so creating a new issue for it.

When building --prod getting the below error:

Error: ./node_modules/ng2-fittext/fesm5/ng2-fittext.js Module build failed: TypeError: Cannot read property 'kind' of undefined at isAngularDecoratorMetadataExpression (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:245:35) at checkNodeForDecorators (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:67:21) at visitNodes (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/typescript/lib/typescript.js:12699:30) at Object.forEachChild (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/typescript/lib/typescript.js:12875:24) at checkNodeForDecorators (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:58:31) at visitNode (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/typescript/lib/typescript.js:12690:24) at Object.forEachChild (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/typescript/lib/typescript.js:12782:21) at checkNodeForDecorators (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:58:31) at visitNode (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/typescript/lib/typescript.js:12690:24) at Object.forEachChild (/Users/kirstenfrager/Documents/Stake/Code/StackIonic/node_modules/typescript/lib/typescript.js:12828:24) @ ./src/pages/onboarding/phase-zero/phase-zero.page.module.ngfactory.js 25:0-35 @ ./src lazy @ ./node_modules/ionic-angular/util/ng-module-loader.js @ ./node_modules/ionic-angular/util/module-loader.js @ ./src/app/app.module.ngfactory.js @ ./src/app/main.ts

Package.json

"dependencies": { "@agm/core": "^1.0.0-beta.5", "@angular/animations": "5.2.11", "@angular/common": "5.2.11", "@angular/compiler": "5.2.11", "@angular/compiler-cli": "5.2.11", "@angular/core": "5.2.11", "@angular/forms": "5.2.11", "@angular/http": "5.2.11", "@angular/platform-browser": "5.2.11", "@angular/platform-browser-dynamic": "5.2.11", "@ionic-native/app-availability": "4.18.0", "@ionic-native/app-rate": "^4.20.0", "@ionic-native/app-version": "4.18.0", "@ionic-native/camera": "4.18.0", "@ionic-native/clipboard": "4.18.0", "@ionic-native/core": "4.18.0", "@ionic-native/file": "^4.20.0", "@ionic-native/file-path": "^4.20.0", "@ionic-native/fingerprint-aio": "^4.20.0", "@ionic-native/in-app-browser": "4.18.0", "@ionic-native/keyboard": "4.18.0", "@ionic-native/pro": "4.18.0", "@ionic-native/safari-view-controller": "4.18.0", "@ionic-native/screen-orientation": "^4.20.0", "@ionic-native/social-sharing": "^4.20.0", "@ionic-native/splash-screen": "4.18.0", "@ionic-native/status-bar": "4.18.0", "@ionic-native/taptic-engine": "^4.20.0", "@ionic-native/unique-device-id": "^5.30.0", "@ionic-native/vibration": "^4.20.0", "@ionic/pro": "^2.0.3", "@ionic/storage": "2.2.0", "@ngrx/store": "^5.2.0", "@ngx-translate/core": "^9.1.1", "@ngx-translate/http-loader": "2.0.1", "@types/highcharts": "^5.0.44", "@types/humps": "^2.0.0", "@types/lodash": "^4.14.119", "analytics-node": "^3.4.0-beta.3", "appboy-cordova-sdk": "git+https://github.com/joelstake/appboy-cordova-sdk.git#master", "branch-cordova-sdk": "^4.2.1", "cep-promise": "^3.0.9", "compare-versions": "^3.6.0", "cordova-android": "^7.1.4", "cordova-android-support-gradle-release": "^1.4.7", "cordova-browser": "5.0.4", "cordova-clipboard": "^1.3.0", "cordova-ios": "^6.1.1", "cordova-plugin-add-swift-support": "^2.0.2", "cordova-plugin-app-version": "^0.1.11", "cordova-plugin-apprate": "^1.7.1", "cordova-plugin-camera": "^4.1.0", "cordova-plugin-cocoapod-support": "^1.6.2", "cordova-plugin-device": "^2.0.3", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-facebook4": "^2.5.0", "cordova-plugin-file": "^6.0.2", "cordova-plugin-file-transfer": "^1.7.1", "cordova-plugin-fingerprint-aio": "^1.7.0", "cordova-plugin-inappbrowser": "^4.1.0", "cordova-plugin-ionic": "^5.4.7", "cordova-plugin-ionic-keyboard": "git+https://github.com/lukas-mertens/cordova-plugin-ionic-keyboard.git", "cordova-plugin-ionic-webview": "^5.0.0", "cordova-plugin-nativestorage": "^2.3.2", "cordova-plugin-proguard": "^2.2.0", "cordova-plugin-safariviewcontroller": "^1.6.0", "cordova-plugin-screen-orientation": "^3.0.2", "cordova-plugin-splashscreen": "^6.0.0", "cordova-plugin-statusbar": "git+https://github.com/apache/cordova-plugin-statusbar.git", "cordova-plugin-taptic-engine": "^2.2.0", "cordova-plugin-uniquedeviceid": "^1.3.2", "cordova-plugin-vibration": "^3.1.1", "cordova-plugin-whitelist": "^1.3.4", "cordova-plugin-x-socialsharing": "^5.6.8", "cpf-check": "^2.0.5", "echarts": "^4.2.0-rc.1", "es6-promise-plugin": "^4.2.2", "file-saver": "^2.0.2", "flipdown": "^0.3.2", "gelerator": "^3.0.0", "generate": "0.14.0", "git-rev-sync": "^3.0.1", "gulp": "^4.0.2", "highcharts": "^6.2.0", "highcharts-custom-events": "^2.2.6", "humps": "^2.0.1", "ionic-angular": "^3.9.2", "ionic-tooltips": "^3.1.0", "ionicons": "3.0.0", "jquery": "^3.4.1", "libphonenumber-js": "^1.8.5", "lodash": "^4.17.11", "moment": "^2.23.0", "moment-timezone": "^0.5.23", "ng-lottie": "^0.3.2", "ng2-fittext": "1.2.12", "ngx-mask": "^6.5.17", "ngx-skeleton-loader": "^2.4.4", "rxjs": "5.5.11", "sw-toolbox": "3.6.0", "ts-md5": "^1.2.7", "tslib": "^1.14.1", "web-animations-js": "^2.3.1", "xlsx": "^0.15.1", "zone.js": "0.8.26" }, "devDependencies": { "@ionic/app-scripts": "3.2.2", "@ionic/lab": "1.0.20", "@types/analytics-node": "^3.1.4", "es6-template-strings": "^2.0.1", "typescript": "~2.6.2" },

Angular environment

`Angular CLI: 11.0.5 Node: 10.16.0 OS: darwin x64

Angular: 5.2.11 ... animations, common, compiler, compiler-cli, core, forms ... http, platform-browser, platform-browser-dynamic Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.1100.5 (cli-only) @angular-devkit/core 11.0.5 (cli-only) @angular-devkit/schematics 11.0.5 (cli-only) @schematics/angular 11.0.5 (cli-only) @schematics/update 0.1100.5 (cli-only) rxjs 5.5.11 typescript 2.6.2`

When running normal dev builds no error occurs. Only with the --prod flags

thisloke commented 5 months ago

Hi @KirstenStake sorry for the huge delay in adressing this issue, anyway, did you still have the error? In case of YES, can you give me the access to a public repository that will contain the breaking example? If NO, can you close the issue?

Thanks! :)