angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

RXJS 6 compatibility

Open GeorgeKnap opened this issue 8 years ago • 18 comments

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';

GeorgeKnap avatar Mar 30 '18 06:03 GeorgeKnap

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

patrickmichalina avatar Apr 01 '18 15:04 patrickmichalina

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.

sconix avatar Apr 04 '18 08:04 sconix

We should have a next release soon.

davideast avatar Apr 09 '18 11:04 davideast

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.

kylecordes avatar Apr 09 '18 13:04 kylecordes

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 :(

rurziceanu avatar Apr 13 '18 13:04 rurziceanu

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

GeorgeKnap avatar Apr 14 '18 13:04 GeorgeKnap

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

rurziceanu avatar Apr 16 '18 08:04 rurziceanu

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

ghost avatar Apr 25 '18 00:04 ghost

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

larssin avatar Apr 27 '18 11:04 larssin

@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.

kylecordes avatar Apr 27 '18 13:04 kylecordes

update to RxJS 6 soon!

ssrahul96 avatar May 06 '18 09:05 ssrahul96

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

rojasjandro89 avatar May 09 '18 19:05 rojasjandro89

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

GeorgeKnap avatar May 09 '18 20:05 GeorgeKnap

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?

rojasjandro89 avatar May 10 '18 12:05 rojasjandro89

Please stick with Firebase JS SDK 4.x for now, we're working on 5.0 compatibility but there are a number of breaking changes.

On Thu, May 10, 2018, 5:52 AM rojasjandro89 [email protected] wrote:

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 and AngularFirestoreCollection.snapshotChanges() to get the document id:

[image: image] https://user-images.githubusercontent.com/17559789/39870379-2e89c9b6-542f-11e8-81cb-f7039a6f791f.png

I get the following error in console: [image: image] https://user-images.githubusercontent.com/17559789/39870176-59a48e34-542e-11e8-8f71-e3e0e55ec28c.png

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?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/angular/angularfire2/issues/1538#issuecomment-388043540, or mute the thread https://github.com/notifications/unsubscribe-auth/AACvryZPp3HLw6-6CqCr1DNMkP_6sOdHks5txDgpgaJpZM4TBW5s .

jamesdaniels avatar May 10 '18 14:05 jamesdaniels

Fixed in angularfire2@next

jamesdaniels avatar May 12 '18 22:05 jamesdaniels

@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.

litchian18 avatar May 15 '18 14:05 litchian18

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.

yoni333 avatar Nov 19 '19 12:11 yoni333