从7升级到8后,我的Angular App的生产版本出现问题。
我不知道真正的问题是什么。这个错误对我来说还不清楚。您对解决我的问题有任何想法吗?
错误:
ERROR in src/__ng_typecheck__.ts(334,62): error TS2344: Type '"enabled" | "minRows" | "maxRows" | "cdkAutosizeMinRows" | "cdkAutosizeMaxRows" | "matAutosizeMinRows" | "matAutosizeMaxRows" | "matAutosize" | "matTextareaAutosize"' does not satisfy the constraint '"ngOnDestroy" | "ngDoCheck" | "enabled" | "reset" | "ngAfterViewInit" | "minRows" | "maxRows" | "matAutosizeMinRows" | "matAutosizeMaxRows" | "matAutosize" | "matTextareaAutosize" | "_setMinHeight" | "_setMaxHeight" | "resizeToFitContent" | "_noopInputHandler"'.
Type '"cdkAutosizeMinRows"' is not assignable to type '"ngOnDestroy" | "ngDoCheck" | "enabled" | "reset" | "ngAfterViewInit" | "minRows" | "maxRows" | "matAutosizeMinRows" | "matAutosizeMaxRows" | "matAutosize" | "matTextareaAutosize" | "_setMinHeight" | "_setMaxHeight" | "resizeToFitContent" | "_noopInputHandler"'.
内部版本:
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
构建命令:
ng build --prod --configuration=my-prod-build
包装
Angular CLI: 8.0.1
Node: 12.4.0
OS: darwin x64
Angular: 8.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.800.1
@angular-devkit/build-angular 0.800.1
@angular-devkit/build-optimizer 0.800.1
@angular-devkit/build-webpack 0.800.1
@angular-devkit/core 8.0.1
@angular-devkit/schematics 0.6.8
@angular/cli 8.0.1
@angular/http 8.0.0-beta.10
@ngtools/webpack 8.0.1
@schematics/angular 8.0.1
@schematics/update 0.800.1
rxjs 6.5.2
typescript 3.4.5
webpack 4.30.0