Skip to content

angularfire 2 isn't working with Angular 6 #1602

Closed

Description

@cagline

Firebase: 3.18.4
AngularFire: 5.0.0-rc.7
Angular CLI: 6.0.0
Angular: 6.0.0
Node: 8.9.4
OS: win32 x64

ERROR in node_modules/angularfire2/database/interfaces.d.ts(2,10): error TS2305: Module '"D:/findmyproperty/node_modules/rxjs/Observable"' has no exported member 'Observable'.as no exported member 'Observable'.                                                                                                         no exported member 'Observable'.
node_modules/angularfire2/database/list/audit-trail.d.ts(2,10): error TS2305: Module '"D:/findmyproperty/node_modules/rxjs/Observable"' has xported member 'Observable'.
no exported member 'Observable'.
node_modules/angularfire2/database/list/changes.d.ts(1,10): error TS2305: Module '"D:/findmyproperty/node_modules/rxjs/Observable"' has no exported member 'Observable'.node_modules/angularfire2/database/list/snapshot-changes.d.ts(1,10): error TS2305: Module '"D:/findmyproperty/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angularfire2/database/list/state-changes.d.ts(2,10): error TS2305: Module '"D:/findmyproperty/node_modules/rxjs/Observable"' has no exported member 'Observable'.node_modules/angularfire2/database/observable/fromRef.d.ts(2,10): error TS2305: Module '"D:/findmyproperty/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.node_modules/rxjs/Subject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subject'.
src/app/core/auth/auth.service.ts(10,10): error TS2305: Module '"D:/findmyproperty/node_modules/rxjs/Subject"' has no exported member 'Subject'.

Activity

  1. hiepxanh commented on May 7, 2018

    @hiepxanh
    Contributor

    please, provide your package.json, maybe you missing something because we have some problem with rxjs upgrade

  2. cagline commented on May 7, 2018

    @cagline
    Author

    I fixed this issue by installing rxjs-compat
    npm install --save rxjs-compat

    update.angular.io
    According to this rxjs-compat can be removed after all of your dependencies have updated to RxJS 6.

    any way here is my package.json

    "angularfire2": "^5.0.0-rc.7",
    "firebase": "^4.13.1",
    "rxjs": "^6.1.0",
    "rxjs-compat": "^6.1.0",
    
    {
      "name": "findmyproperty",
      "version": "0.0.0",
      "license": "MIT",
      "scripts": {
        "ng": "ng",
        "start": "ng serve",
        "build": "ng build --prod",
        "test": "ng test",
        "lint": "ng lint",
        "e2e": "ng e2e"
      },
      "private": true,
      "dependencies": {
        "@angular/animations": "6.0.0",
        "@angular/cdk": "^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/material": "^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.4.1",
        "firebase": "^4.13.1",
        "rxjs": "^6.1.0",
        "rxjs-compat": "^6.1.0",
        "zone.js": "^0.8.26"
      },
      "devDependencies": {
        "@angular/cli": "6.0.0",
        "@angular/compiler-cli": "6.0.0",
        "@angular/language-service": "6.0.0",
        "@types/jasmine": "~2.8.3",
        "@types/jasminewd2": "~2.0.2",
        "@types/node": "~6.0.60",
        "codelyzer": "^4.0.1",
        "jasmine-core": "~2.8.0",
        "jasmine-spec-reporter": "~4.2.1",
        "karma": "~2.0.0",
        "karma-chrome-launcher": "~2.2.0",
        "karma-coverage-istanbul-reporter": "^1.2.1",
        "karma-jasmine": "~1.1.0",
        "karma-jasmine-html-reporter": "^0.2.2",
        "protractor": "~5.1.2",
        "ts-node": "~4.1.0",
        "tslint": "~5.9.1",
        "typescript": "2.7.2",
        "@angular-devkit/build-angular": "~0.6.0"
      }
    }
    
    
  3. hiepxanh commented on May 7, 2018

    @hiepxanh
    Contributor

    yes, that exactly what I'm going to talk with you @cagline . but I want to make sure that you missing rxjs-compat. should we left this repository open then make an update in angularfire2 to includes rxjs-compat or close it and we update directly our library to rxjs 6 without includes rxjs-compat? @davideast

  4. cagline commented on May 7, 2018

    @cagline
    Author

    update.angular.io
    According to this rxjs-compat can be removed after all of your dependencies have updated to RxJS 6.
    for now i think you can make an update inangularfire2to includes rxjs-compat

    image

  5. hiepxanh commented on May 7, 2018

    @hiepxanh
    Contributor

    yeah, that right 😄 maybe @jamesdaniels can make an small update for this issue

  6. SebastianPodgajny commented on May 8, 2018

    @SebastianPodgajny

    rxjs-compat is not meant to be used in libraries...

  7. jamesdaniels commented on May 12, 2018

    @jamesdaniels
    Contributor

    Fixed in angularfire2@next

  8. FouomaOscar commented on Jun 5, 2018

    @FouomaOscar

    That is my code example fine https://github.com/FouomaOscar/firebase-authentication-with-angular-6. It's works fine

  9. matthewharwood commented on Jun 6, 2018

    @matthewharwood

    Yeah I had to install angularfire2@next to remove these errors

  10. jdevsan commented on Jul 21, 2018

    @jdevsan

    People im getting this error! please helppp!

    ERROR in src/app/feed/feed.component.ts(6,10): error TS2305: Module '"/Users/joecastro/Desktop/angular/base-chat/node_modules/angularfire2/database/index"' has no exported member 'FirebaseListObservable'.
    src/app/services/chat.service.ts(56,37): error TS2345: Argument of type '{ query: { limitToLast: number; orderByKey: boolean; }; }' is not assignable to parameter of type 'FirebaseListFactoryOpts'.
    Types of property 'query' are incompatible.
    Type '{ limitToLast: number; orderByKey: boolean; }' is not assignable to type 'Query'.
    Property 'endAt' is missing in type '{ limitToLast: number; orderByKey: boolean; }'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions