Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property 'performance' is missing in type 'FirebaseApp' but required in type 'App'

I seem to be getting this error when I try to run a fresh install of Angular 7.2 and Firebase:

ERROR in node_modules/@angular/fire/firebase.app.module.d.ts(17,22): error TS2420: Class 'FirebaseApp' incorrectly implements interface 'App'.
  Property 'performance' is missing in type 'FirebaseApp' but required in type 'App'.

Tried switching between different versions of @angular/fire and firebase, but didn't manage to find a working combination.

Current package.json :

{
  "name": "my-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "compile:server": "webpack --config webpack.server.config.js --progress --colors",
    "serve:ssr": "node dist/server",
    "build:ssr": "npm run build:client-and-server-bundles && npm run compile:server",
    "build:client-and-server-bundles": "ng build --prod && ng run supynes-full:server:production"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~7.2.0",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/http": "~7.2.0",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/platform-server": "~7.2.0",
    "@angular/router": "~7.2.0",
    "@nguniversal/express-engine": "^7.1.1",
    "@nguniversal/module-map-ngfactory-loader": "^7.0.2",
    "core-js": "^2.5.7",
    "dynamic-import-ponyfill": "^0.1.0",
    "firebase": "^5.3.1",
    "flamelink": "^0.19.6",
    "node-fetch": "^2.2.0",
    "rxjs": "^6.2.2",
    "tslib": "^1.9.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.13.0",
    "@angular/cli": "~7.3.5",
    "@angular/compiler-cli": "~7.2.0",
    "@angular/language-service": "~7.2.0",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-loader": "^5.2.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.2.2",
    "webpack-cli": "^3.1.0"
  }
}

Has anyone encountered this error? Google doesn't seem to find anything related to the performance property, there are only similar errors, but not the same ones. Any ideas?

like image 599
martinkus Avatar asked Dec 23 '22 23:12

martinkus


2 Answers

I'm also getting this error. Seems latest ver. of firebase which is 5.11.0 is broken.

Changing my dependencies to 5.10.0 solved this issue.

Important: do NOT use any ~ or ^ ver. prefix

like image 144
Romko Avatar answered Dec 25 '22 12:12

Romko


Managed to resolve the issue by specifying firebase's version to be "5.0.4", not "^5.0.4".

like image 33
martinkus Avatar answered Dec 25 '22 12:12

martinkus