Flex-layout: Support for RxJS 6 and Angular 6

Created on 2 Apr 2018  路  9Comments  路  Source: angular/flex-layout

Compilation fails on Angular 6 RC1 and RxJS 6.0.0 RC.0 due to deprecated symbol imports

Without the rxjs-compat module, errors are all over the place because Flex-Layout imports symbols from prior to the new RxJS barrels exports.

Solution: a new Flex-Layout branch (6.0.0 ?) with support for Angular6 and RxJS6.

Update: I can see @ThomasBurleson is playing with a branch, thanks

ERROR in ./node_modules/rxjs/BehaviorSubject.js
Module not found: Error: Can't resolve 'rxjs-compat/BehaviorSubject' in '/Users/spock/project/dba/test/frontend/node_modules/rxjs'
 @ ./node_modules/rxjs/BehaviorSubject.js 6:9-47
 @ ./node_modules/@angular/flex-layout/esm5/core.es5.js
 @ ./node_modules/@angular/flex-layout/esm5/flex-layout.es5.js
invalid

Most helpful comment

You must include in your package.json:

"rxjs": "6.1.0",
"rxjs-compat": "6.1.0",

All 9 comments

You must include in your package.json:

"rxjs": "6.0.0-beta.1",
"rxjs-compat": "6.0.0-beta.1",

Hi @julianobrasil yes, using rxjs-compat works but it would be super nice with a version that supports RxJS6 out of the box instead of this workaround. I should have stated that in my original comment.

RxJS is in RC.0 now

This capability has already been merged into the nightly branch. Are you using that, or are you using the beta.14 release? Either way, closing as this will be officially supported in v6.0.0-beta.15

Fixed with SHA b3f3404d11476b2a2a68b14dcabcd40f1753c123 (will be available on NPM with upcoming Beta.15 release)

Thanks guys, I'm using the beta 14 - will shift to nightly until beta 15 is out.

Thanks again, sorry for the disturbance.

Not working even with v6.0.1 of rxjs and angular itself.
Cannot find module 'rxjs-compat/Observable

You must include in your package.json:

"rxjs": "6.1.0",
"rxjs-compat": "6.1.0",

@julianobrasil as stated by @spock123 using rxjs-compat works but it would be super nice to have a version that supports RxJS 6 out of the box instead of this workaround.

I'm going to lock the conversation on this issue since this is not an issue with the library, which has _full compatibility_ with RxJS v6.

To clarify, if you are using the 5.x branch of Flex Layout (e.g. 5.0.0-beta.14), you must install rxjs-compat, because that branch is meant to be compatible with Angular v5 and RxJS v5.5

If you are on the 6.x branch of Flex Layout (e.g. 6.0.0-beta.15), you do not need to install rxjs-compat. This version is _fully compatible_ with RxJS v6.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spottedmahn picture spottedmahn  路  5Comments

MarcusMorba picture MarcusMorba  路  3Comments

Kizmar picture Kizmar  路  4Comments

nueko picture nueko  路  5Comments

manuelbachl picture manuelbachl  路  5Comments