Angularfire: Typescript error rxjs

Created on 10 Jul 2018  路  6Comments  路  Source: angular/angularfire

I have an old proyect with Angularfire2 2.0.0-beta.2 ionic2, node version 6.14.3.
The problem when compile are a lot of Typescript errors, all under node_modules/angularfire2/node_modules/rxjs/ folder

I think maybe angularfire2 has a wrong version. any help with this?

Most helpful comment

Using NVM and downgrading versions of Angular, AngularFire2 and firebase y manage to get my app to work. I suggest using older versions that are still compatible until the release of Ionic 4. Apparently with Ionic 3 there's no complete rxjs6 compatibility.
With NVM I set up this environment :

Node 9.11.2
NPM 5.6.0
Ionic 3.20.0
Firebase Tools 3.19.0

This is the dependencies I am using in my package.json :

dependecies: {
    .... [other dependencies]
    "@ionic-native/core": "4.4.0",
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "5.0.3",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@firebase/app": "^0.1.10",
    "angularfire2": "^5.0.0-rc.6",
     "firebase": "^4.10.1",
    "firebase-admin": "^5.12.0",
    "firebase-functions": "^1.0.2",
    "ionic-angular": "3.9.2",
    "jshint": "^2.9.5",
    "node-gcm": "^1.0.1",
    "npm": "^6.0.0",
    "promise-polyfill": "^7.1.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
},
  "devDependencies": {
    "typescript": "2.4.2"
  },

Hope this helps anyone.

All 6 comments

I'll advice you to update all your packages if you haven't done so already,
Last time i checked, rxjs packages have been updated to version 6.2.1, so it may cause breakage.

I am having issues with rxjs library update, started this week with a working project. Followed the migration guide:

npm i -g rxjs-tslint
rxjs-5-to-6-migrate -p [path/to/tsconfig.json]

Didn't have better results.

Error: Uncaught (in promise): Error: Cannot find module "."
Error: Cannot find module "."

Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.10
Angular Core: ^6.0.9
Angular Compiler CLI: ^5.2.11
Node: 10.6.0
OS Platform: macOS High Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

I can麓t change ionic version. must be 2.0

Sorry, you're using a version that's two years out of date; we don't have the bandwidth to support this. I recommend upgrading your project.

Closing, feel free to continue to discuss.

I also get errors when using Ionic 3. Because Ionic 4 (with angular6 integration) isn't released yet, I'm forced to use angular 5 (which is in Ionic 3).
Which version of angularfire2 works with angular5?

EDIT:

1748 suggested to use rxjs6 and compat instead, which worked!

Using NVM and downgrading versions of Angular, AngularFire2 and firebase y manage to get my app to work. I suggest using older versions that are still compatible until the release of Ionic 4. Apparently with Ionic 3 there's no complete rxjs6 compatibility.
With NVM I set up this environment :

Node 9.11.2
NPM 5.6.0
Ionic 3.20.0
Firebase Tools 3.19.0

This is the dependencies I am using in my package.json :

dependecies: {
    .... [other dependencies]
    "@ionic-native/core": "4.4.0",
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "5.0.3",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@firebase/app": "^0.1.10",
    "angularfire2": "^5.0.0-rc.6",
     "firebase": "^4.10.1",
    "firebase-admin": "^5.12.0",
    "firebase-functions": "^1.0.2",
    "ionic-angular": "3.9.2",
    "jshint": "^2.9.5",
    "node-gcm": "^1.0.1",
    "npm": "^6.0.0",
    "promise-polyfill": "^7.1.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
},
  "devDependencies": {
    "typescript": "2.4.2"
  },

Hope this helps anyone.

Was this page helpful?
0 / 5 - 0 ratings