h2qutc / angular-material-components

Angular Material Library provide extra components for every project
https://h2qutc.github.io/angular-material-components/
MIT License
331 stars 162 forks source link

File-Input Component: Missing 'updateErrorState' in _MatInputMixinBase #21

Open bernhardpointner opened 4 years ago

bernhardpointner commented 4 years ago

ERROR in node_modules/@angular-material-components/file-input/lib/file-input.component.d.ts:6:10 - error TS2305: Module '"C:/[...]/app/node_modules/@ angular/material/input"' has no exported member '_MatInputMixinBase'.

import { _MatInputMixinBase } from '@angular/material/input';

node_modules/@angular-material-components/file-input/lib/file-input.component.d.ts:11:22 - error TS2420: Class 'NgxMatFileInputComponent' incorrectly implements i nterface 'CanUpdateErrorState'. Property 'updateErrorState' is missing in type 'NgxMatFileInputComponent' but required in type 'CanUpdateErrorState'.

export declare class NgxMatFileInputComponent extends _MatInputMixinBase implements MatFormFieldControl<FileOrArrayFile>, OnDestroy, DoCheck, CanUpdateErrorSta te, ControlValueAccessor {

node_modules/@angular/material/core/common-behaviors/error-state.d.ts:14:5 updateErrorState(): void; updateErrorState' is declared here.

"dependencies": { "@angular-material-components/file-input": "^2.0.0", "@angular/animations": "~9.0.6", "@angular/cdk": "^9.2.0", "@angular/common": "~9.0.6", "@angular/compiler": "~9.0.6", "@angular/core": "~9.0.6", "@angular/flex-layout": "^9.0.0-beta.29", "@angular/forms": "~9.0.6", "@angular/material": "^9.1.3", "@angular/platform-browser": "~9.0.6", "@angular/platform-browser-dynamic": "~9.0.6", "@angular/router": "~9.0.6", "d3": "^5.15.0", "rxjs": "~6.5.4", "tslib": "^1.10.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.900.6", "@angular/cli": "~9.0.7", "@angular/compiler-cli": "~9.0.6", "@angular/language-service": "~9.0.6", "@types/d3": "^5.7.2", "@types/jasmine": "~3.5.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "codelyzer": "^5.1.2", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~2.1.0", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.2", "protractor": "~5.4.3", "ts-node": "~8.3.0", "tslint": "~5.18.0", "typescript": "~3.7.5" }

Vgratioulet commented 4 years ago

Maybe these warnings are related :

$ npm install --save @angular-material-components/file-input npm WARN @angular-material-components/file-input@2.0.0 requires a peer of @angular/platform-browser@0.0.0-NG but none is installed. You must install peer dependencies yourself. npm WARN @angular-material-components/file-input@2.0.0 requires a peer of @angular/common@0.0.0-NG but none is installed. You must install peer dependencies yourself. npm WARN @angular-material-components/file-input@2.0.0 requires a peer of @angular/core@0.0.0-NG but none is installed. You must install peer dependencies yourself. npm WARN @angular-material-components/file-input@2.0.0 requires a peer of @angular/forms@0.0.0-NG but none is installed. You must install peer dependencies yourself. npm WARN @angular-material-components/file-input@2.0.0 requires a peer of @angular/material@0.0.0-PLACEHOLDER but none is installed. You must install peer dependencies yourself. npm WARN @angular-material-components/file-input@2.0.0 requires a peer of @angular/cdk@0.0.0-PLACEHOLDER but none is installed. You must install peer dependencies yourself. npm WARN @angular-material-components/file-input@2.0.0 requires a peer of tslib@0.0.0-TSLIB but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/webpack-dev-server/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/watchpack/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

wer1976 commented 4 years ago

Problem is due to a commit in the underlying angular/components on April 25, 2019, #15743: refactor: remove mixin classes from public api (#15743). One solution would be to define the mixins in this component again.

ckapop commented 4 years ago

Does defining the mixins in this component again fix this issue?

DominikTrenz commented 4 years ago

Yes it fixes this issue but another issue appears (during runtime):

core.js:5882 ERROR TypeError: Cannot read property 'nativeElement' of undefined
    at NgxMatFileInputComponent._updateInputValue (angular-material-components-file-input.js:380)