Skip to content

RXJS 6 compatibility #1538

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

Closed
GeorgeKnap opened this issue Mar 30, 2018 · 18 comments
Closed

RXJS 6 compatibility #1538

GeorgeKnap opened this issue Mar 30, 2018 · 18 comments

Comments

@GeorgeKnap
Copy link

Version info

Angular: 6.0.0-rc.0

Firebase: 4.12.0

AngularFire: 5.0.0-rc.6

Other (e.g. Ionic/Cordova, Node, browser, operating system):

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

How to reproduce these conditions

ng serve fails with following error

ERROR in ./node_modules/angularfire2/database/observable/fromRef.js
Module not found: Error: Can't resolve 'rxjs/operator/observeOn' in 'C:\Development\profile-web\node_modules\angularfire2\database\observable'

in the fromRef.js file needs to be fixed import
import { observeOn } from 'rxjs/operator/observeOn';
to
import { observeOn } from 'rxjs/operators/observeOn';

@patrickmichalina
Copy link

I actually think it would be import { observeOn } from 'rxjs/operators

@sconix
Copy link

sconix commented Apr 4, 2018

Would be nice to get even some @next release for this. I can see that there was already changes made that removed the usage of observeOn so some sort of pre-release would allow us to start migrating to Angular 6.

@davideast
Copy link
Collaborator

We should have a next release soon.

@kylecordes
Copy link

Perhaps because of the RxJS version change, there seems to be a greater than usual level of activity around the Angular community aiming to have version 6 compatibility very close to the version 6 ship date. It would be great to see Angularfire2 come along for this ride.

@rurziceanu
Copy link

rurziceanu commented Apr 13, 2018

Hi
I see in npm version 5.0.0-rc.7.0-next published 4 days ago
After upgrading to angular 6 rc and rxjs 6, and angularfire 5.0.0-rc.7.0-next I still have the errors in angularfire related to use of old rxjs functions

Module not found: Error: Can't resolve 'rxjs/add/operator/mergeMap'
ERROR in ./node_modules/angularfire2/database/list/changes.js

Did I miss something? wasn't the next version supposed to be based on the new rxjs version? like angular 6 rc?
I started the migration of my project to angular 6 rc but I'm stuck because of angularfire :(

@GeorgeKnap
Copy link
Author

@rurziceanu
I think we have to wait for v6.next release.

@rurziceanu
Copy link

Is there release date for the v6.next? because angular v6 is now at release candidate 5.. and no angularfire2 package since now for v6.. all other dependencies are up to date.. :(
I have only angularfire2 to migrate

@ghost
Copy link

ghost commented Apr 25, 2018

rxjs just release 6.0 stable. They included a migration script to avoid the compat-layer.

@larssin
Copy link

larssin commented Apr 27, 2018

I use the [email protected] to run the [email protected] and [email protected] together.
See the Rxjs upgrade guide: https://docs.google.com/document/d/12nlLt71VLKb-z3YaSGzUfx6mJbc34nsMXtByPUN35cg/preview

@kylecordes
Copy link

@larssin That is quite interesting, it is the first suggestion I have seen (among many discussions!) to run Angular 6 with RxJS 5 forward-compat. This is a great workaround until Angularfire gets updated.

@ssrahul96
Copy link

update to RxJS 6 soon!

@rojasjandro89
Copy link

Any updates on this topic?? This renders AngularFire2 useless with the new version of angular

@GeorgeKnap
Copy link
Author

@rojasjandro89 Temporary it works with rxjs-compat package and Angular 6. But yes, we are all eager for the new version.

@rojasjandro89
Copy link

rojasjandro89 commented May 10, 2018

I can see it compiles just fine now. But it's giving me another error now. After I install the compat package I can't map or even subscribe to AngularFirestoreCollection.snapshotChanges() to get the document id:

image

I get the following error in console:
image

This is my package.json:
{ "name": "support-portal", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^6.0.0", "@angular/common": "^6.0.0", "@angular/compiler": "^6.0.0", "@angular/core": "^6.0.0", "@angular/forms": "^6.0.0", "@angular/http": "^6.0.0", "@angular/platform-browser": "^6.0.0", "@angular/platform-browser-dynamic": "^6.0.0", "@angular/router": "^6.0.0", "angularfire2": "^5.0.0-rc.7", "core-js": "^2.5.4", "firebase": "^5.0.1", "rxjs": "^6.0.0", "rxjs-compat": "^6.1.0", "zone.js": "^0.8.26" }, "devDependencies": { "@angular/compiler-cli": "^6.0.0", "@angular-devkit/build-angular": "~0.6.0", "typescript": "~2.7.2", "@angular/cli": "~6.0.0", "@angular/language-service": "^6.0.0", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "codelyzer": "~4.2.1", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~1.7.1", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~1.4.2", "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.3.0", "ts-node": "~5.0.1", "tslint": "~5.9.1" }, "prettier": { "printWidth": 250 } }
Is anybody else having this problem?

@jamesdaniels
Copy link
Member

jamesdaniels commented May 10, 2018 via email

@jamesdaniels
Copy link
Member

Fixed in angularfire2@next

@litchian18
Copy link

litchian18 commented May 15, 2018

@jamesdaniels Please look at @rojasjandro89 issue, I am facing the same issue, cant map to read firestore after update angular 6.

Angularfire2@next doesnt fix.

@yoni333
Copy link

yoni333 commented Nov 19, 2019

angular 8 , rxjs 6.4 . angularfire 5.2.3 - got ther error
ERROR in node_modules/rxjs/internal/symbol/observable.d.ts(4,18): error TS2687: All declarations of 'observable' must have identical modifiers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests