[resolved] RxJS 6.3.0 breaks angular flex layout
I just tried to use rxjs 6.3.0 and it seems that it breaks angular flex-layout so I returned to RxJS 6.2.2
ERROR in 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<MediaChange>'.
Type '(next?: (value: MediaChange) => void, error?: (error: any) => void, complete?: () => void) => Sub...' is not assignable to type '{ (observer?: PartialObserver<MediaChange>): Unsubscribable; (next?: (value: MediaChange) => void...'.
Types of parameters 'next' and 'observer' are incompatible.
Type 'PartialObserver<MediaChange>' is not assignable to type '(value: MediaChange) => void'.
Type 'NextObserver<MediaChange>' is not assignable to type '(value: MediaChange) => void'.
Type 'NextObserver<MediaChange>' provides no match for the signature '(value: MediaChange): void'.
Same, also reverted to 6.2.2 to fix the build.
@skiabox what version of @angular/flex-layout are you using? Bec, I'm getting the same error. Thanks.
So here's the rub: RxJS v6.3 introduced a change to the Subscribable interface, which is what ObservableMedia extends. As a result, the type errors you've all been getting have surfaced leading to the bad builds.
I've patched this in #828 and once it gets merged we will cut the beta 18 release (likely early tomorrow). Apologies to everyone for the inconvenience. The workaround until then is to downgrade RxJS to v6.2.
Although this issue is fixed, I'm going to reopen it until the new release has been published for visibility.
Can confirm and thanks for the quick fix in. #828
Thank for this, I still waiting for the the new release has been published
I am having the same issue with rxjs at 6.2.2 and flex-layout at 6.0.0-beta.16
ERROR in node_modules/@angular/flex-layout/core/typings/observable-media/observable-media.d.ts(11,14): error TS2416: Property 'subscribe' in type 'ObObservableMedia' is not assignable to the same property in base type 'Subscribable<MediaChange>'.
I've updated rxjs to 6.3 and Typescript to 2.9 but still not working, tried also downgrading to 6.0.0-beta.16 but still not working.
Seems like the fix is not released yet! Any update on this issue please ?
@bloodymind I updated to rxjs 6.3 and then downgraded again to rxjs 6.0.0. Weird but it worked for me
@sahilt75, Please share all dependencies and devDependencies
Version 6.0.0-beta.18 has been published on NPM. Please update to resolve this issue.
With the beta.18 release I now see this error:
ERROR in node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(72,67): error TS1144: '{' or ';' expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(74,5): error TS1128: Declaration or statement expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(74,33): error TS1005: ';' expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(74,39): error TS1109: Expression expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(79,5): error TS1128: Declaration or statement expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(80,1): error TS1128: Declaration or statement expected.
+1. Same issue as jgeiger-cr
Please provide a minimal reproduction, I'm not seeing this on our internal tests. Also please try a clean uninstall/reinstall.
Sorry, I'm using TS ~2.7.2, Angular ^6.1.6, and already tried a fresh NPM install.
Not sure if it's related to the same issue but I did a clean install with npm instead of Yarn and it built fine
I just installed it successfully on our StackBlitz online (tried with both TS 2.7.2 and TS 2.9.2). If you're facing an install/build issue after upgrading, it's likely the install step didn't work correctly.
after updating the version number for flex-layout in package.json, the following worked for me: npm install reinstall @angular/flex-layout
P.S. I kept RXJS @ 6.3.1 and it still worked
4 of our developers independently see the same problem with fresh NPM installs on Macs, Windows, Linux. Even IntelliJ sees the errors in node_modules/@angular/flex-layout/extended/typings/style/style.d.ts

Ok I see it now. The import syntax is new for TS, and only works with TS 2.9. The workaround is to bump to TS 2.9 as well while we consider options internally.
However, it might be the case that this is the terminal stage in our support for TS 2.7 (ie if you want to use RxJS 6.3, you also need to bump to TS 2.9).