Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

ERROR in node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(25,15): error TS2416: Property '_registry' in type 'MockMatchMedia' is not assignable to the same property in base type 'MatchMedia'. #861

Closed
waynehong789 opened this issue Oct 10, 2018 · 3 comments

Comments

@waynehong789
Copy link

After updated to latest version 7.0.0-beta.19, got this error:
ERROR in node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(25,15): error TS2416: Property 'registry' in type 'MockMatchMedia' is not assignable to the same property in base type 'MatchMedia'.
Type 'Map<string, MockMediaQueryList>' is not assignable to type 'Map<string, MediaQueryList>'.
Type 'MockMediaQueryList' is not assignable to type 'MediaQueryList'.
Types of property 'removeListener' are incompatible.
Type '(
: EventListenerOrEventListenerObject) => void' is not assignable to type '(listener: MediaQueryListListener) => void'.
Types of parameters '' and 'listener' are incompatible.
Type 'MediaQueryListListener' is not assignable to type 'EventListenerOrEventListenerObject'.
Type 'MediaQueryListListener' is not assignable to type 'EventListenerObject'.
Property 'handleEvent' is missing in type 'MediaQueryListListener'.
node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(82,5): error TS2416: Property 'removeListener' in type 'MockMediaQueryList' is not assignable to the same property in base type 'MediaQueryList'.
Type '(
: EventListenerOrEventListenerObject) => void' is not assignable to type '(listener: MediaQueryListListener) => void'.
Types of parameters '' and 'listener' are incompatible.
Type 'MediaQueryListListener' is not assignable to type 'EventListenerOrEventListenerObject'.
Type 'MediaQueryListListener' is not assignable to type 'EventListenerObject'.
node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(83,38): error TS2304: Cannot find name 'MediaQueryListEventMap'.
node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(83,99): error TS2304: Cannot find name 'MediaQueryListEventMap'.
node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(84,41): error TS2304: Cannot find name 'MediaQueryListEventMap'.
node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(84,102): error TS2304: Cannot find name 'MediaQueryListEventMap'.
node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(95,67): error TS2304: Cannot find name 'MediaQueryListEvent'.
node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(30,5): error TS2416: Property 'removeListener' in type 'ServerMediaQueryList' is not assignable to the same property in base type 'MediaQueryList'.
Type '(
: EventListenerOrEventListenerObject) => void' is not assignable to type '(listener: MediaQueryListListener) => void'.
Types of parameters '' and 'listener' are incompatible.
Type 'MediaQueryListListener' is not assignable to type 'EventListenerOrEventListenerObject'.
Type 'MediaQueryListListener' is not assignable to type 'EventListenerObject'.
node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(31,38): error TS2304: Cannot find name 'MediaQueryListEventMap'.
node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(31,99): error TS2304: Cannot find name 'MediaQueryListEventMap'.
node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(32,41): error TS2304: Cannot find name 'MediaQueryListEventMap'.
node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(32,102): error TS2304: Cannot find name 'MediaQueryListEventMap'.
node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(46,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'.
Types of property 'removeListener' are incompatible.
Type '(
: EventListenerOrEventListenerObject) => void' is not assignable to type '(listener: MediaQueryListListener) => void'.
Types of parameters '
' and 'listener' are incompatible.
Type 'MediaQueryListListener' is not assignable to type 'EventListenerOrEventListenerObject'.
Type 'MediaQueryListListener' is not assignable to type 'EventListenerObject'.
node_modules/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(58,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/@angular/flex-layout/core/typings/match-media/server-match-media.d.ts(60,67): error TS2304: Cannot find name 'MediaQueryListEvent'.

@cmaitrepierre
Copy link

Hello i have also the same error but when installing npm install @angular/flex-layout@latest --save , some warnings says about cdl, core and common:

PS C:\Users\cmaitrep\dev\Projects\rmp-app> npm install @angular/flex-layout@latest --savenpm WARN rollback Rolling back rc@1.2.7 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\cmaitrep\dev\Projects\rmp-app\node_modules\fsevents'npm WARN @angular/flex-layout@7.0.0-beta.19 requires a peer of @angular/cdk@^7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/flex-layout@7.0.0-beta.19 requires a peer of @angular/core@>=7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.

Does a specific version of flex-layout works ?

@CaerusKaru
Copy link
Member

As the version number indicates, this version requires both Angular v7 and TypeScript v3.1. Please ensure both are installed in order for any build to succeed.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants