New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flex-layout producing errors with Angular 7 #203
Comments
Facing same issue when updated to angular 7 and typescript 3.1.1 |
We are upgrading the project to be compatible with Angular 7. A major version will be released soon. |
This should be fixed in 22.0.0. Please let me know if you still see issues. |
The issue exists. ERROR in node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(62,22): error TS2420: Class 'MockMediaQueryList' incorrectly implements interface 'MediaQueryList'. |
Could you create a stackblitz where this can be reproduced? I can't reproduce locally. |
When is the release date |
It should be fixed in 22.0.0. If you're still seeing it, please create a stackblitz, because I can not reproduce the issue. |
Is it fixed? |
Yes. |
10% building 3/3 modules 0 activei 「wds」: Project is running at http://localhost:4200/webpack-dev-server/ ERROR in ../node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts:62:22 - error TS2420: Class 'MockMediaQueryList' incorrectly implements interface 'MediaQueryList'. 62 export declare class MockMediaQueryList implements MediaQueryList { 79 addListener(listener: MediaQueryListListener): void; 81 removeListener(_: MediaQueryListListener): void; 12 export declare class ServerMediaQueryList implements MediaQueryList { 29 addListener(listener: MediaQueryListListener): void; 31 removeListener(_: MediaQueryListListener): void; 43 protected _registry: Map<string, ServerMediaQueryList>; 55 protected _buildMQL(query: string): ServerMediaQueryList; ** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **i 「wdm」: Failed to compile. |
I am getting this error while upgrading from Angular 6 to Angular 8 |
"devDependencies": { |
@skynolimits247 I think there was a breaking change in one of the @angular/flex-layout versions. Please take a look at their changelog and update your code accordingly. |
Thanks !! |
chunk {main} main.js, main.js.map (main) 2.02 kB [initial] [rendered] ERROR in node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts:26:15 - error TS2416: Property '_registry' in type 'MockMatchMedia' is not assignable to the same property in base type 'MatchMedia'. 26 protected _registry: Map<string, MockMediaQueryList>; 66 export declare class MockMediaQueryList implements MediaQueryList { 83 addListener(listener: MediaQueryListListener): void; 85 removeListener(_: MediaQueryListListener): void; 12 export declare class ServerMediaQueryList implements MediaQueryList { 29 addListener(listener: MediaQueryListListener): void; 31 removeListener(_: MediaQueryListListener): void; 43 protected _registry: Map<string, ServerMediaQueryList>; 55 protected _buildMQL(query: string): ServerMediaQueryList; |
flex-layout will be removed in the next release. |
Till then , what to do with the problem ? |
@nickhilll01 Does the issue only show when using ng7 or ng8? I'm sorry but the next version will remove flex-layout and likely only support ng9. I suggest mograting to ng9. |
node_modules/@swimlane/ngx-ui/node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(62,22): error TS2420: Class 'MockMediaQueryList' incorrectly implements interface 'MediaQueryList'.
Property 'onchange' is missing in type 'MockMediaQueryList'.
node_modules/@swimlane/ngx-ui/node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(79,27): error TS2304: Cannot find name 'MediaQueryListListener'.
node_modules/@swimlane/ngx-ui/node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(81,23): error TS2304: Cannot find name 'MediaQueryListListener'.
node_modules/@swimlane/ngx-ui/node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(11,22): error TS2420: Class 'ServerMediaQueryList' incorrectly implements interface 'MediaQueryList'.
Property 'onchange' is missing in type 'ServerMediaQueryList'.
node_modules/@swimlane/ngx-ui/node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(28,27): error TS2304: Cannot find name 'MediaQueryListListener'.
node_modules/@swimlane/ngx-ui/node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(30,23): error TS2304: Cannot find name 'MediaQueryListListener'.
node_modules/@swimlane/ngx-ui/node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(42,15): error TS2416: Property '_registry' in type 'ServerMatchMedia' is not assignable to the same property in base type 'MatchMedia'.
Type 'Map<string, ServerMediaQueryList>' is not assignable to type 'Map<string, MediaQueryList>'.
Type 'ServerMediaQueryList' is not assignable to type 'MediaQueryList'.
Property 'onchange' is missing in type 'ServerMediaQueryList'.
node_modules/@swimlane/ngx-ui/node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(54,15): error TS2416: Property '_buildMQL' in type 'ServerMatchMedia' is not assignable to the same property in base type 'MatchMedia'.
Type '(query: string) => ServerMediaQueryList' is not assignable to type '(query: string) => MediaQueryList'.
Type 'ServerMediaQueryList' is not assignable to type 'MediaQueryList'.
node_modules/@swimlane/ngx-ui/node_modules/@angular/flex-layout/core/typings/observable-media/observable-media.d.ts(11,14): error TS2416: Property 'subscribe' in type 'ObservableMedia' is not assignable to the same property in base type 'Subscribable'.
Type '(next?: (value: MediaChange) => void, error?: (error: any) => void, complete?: () => void) => Subscription' is not assignable to type '{ (observer?: PartialObserver): Unsubscribable; (next?: (value: MediaChange) => void, error?: (error: any) => void, complete?: () => void): Unsubscribable; }'.
Types of parameters 'next' and 'observer' are incompatible.
Type 'PartialObserver' is not assignable to type '(value: MediaChange) => void'.
Type 'NextObserver' is not assignable to type '(value: MediaChange) => void'.
Type 'NextObserver' provides no match for the signature '(value: MediaChange): void'.
The text was updated successfully, but these errors were encountered: