爱奥尼亚3号项目中的Firebase

爱奥尼亚3号项目中的Firebase,firebase,ionic3,angular5,Firebase,Ionic3,Angular5,当我尝试运行我的ionic项目时,使用ionic serve或ionic cordova run android--device,会出现以下错误: typescript:node_modules/@firebase/database/dist/esm/src/api/database.d.ts,第4行 找不到模块'@firebase/app types/private' 我不知道为什么会这样。另外,我最近升级到Angular 5,不知道这是否有什么关系。 这是我的package.json "d

当我尝试运行我的ionic项目时,使用
ionic serve
ionic cordova run android--device
,会出现以下错误:

typescript:node_modules/@firebase/database/dist/esm/src/api/database.d.ts,第4行
找不到模块'@firebase/app types/private'

我不知道为什么会这样。另外,我最近升级到Angular 5,不知道这是否有什么关系。
这是我的package.json

 "dependencies": {
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/flex-layout": "2.0.0-beta.12",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "@ionic-native/admob-free": "^4.5.2",
    "@ionic-native/camera": "^4.5.2",
    "@ionic-native/core": "^4.5.2",
    "@ionic-native/facebook": "^4.5.2",
    "@ionic-native/fcm": "^4.5.2",
    "@ionic-native/file": "^4.5.2",
    "@ionic-native/file-transfer": "^4.5.2",
    "@ionic-native/geolocation": "^4.5.2",
    "@ionic-native/google-maps": "^4.5.2",
    "@ionic-native/network": "^4.5.2",
    "@ionic-native/splash-screen": "^4.5.2",
    "@ionic-native/status-bar": "^4.5.2",
    "@ionic/storage": "^2.0.1",
    "@ngx-translate/core": "9.0.1",
    "@ngx-translate/http-loader": "2.0.0",
    "@types/google-maps": "^3.2.0",
    "@types/googlemaps": "3.30.0",
    "codelyzer": "^4.0.2",
    "cordova-admob-sdk": "^0.11.1",
    "cordova-android": "^6.4.0",
    "cordova-plugin-add-swift-support": "1.7.0",
    "cordova-plugin-admob-free": "^0.11.0",
    "cordova-plugin-browsertab": "^0.2.0",
    "cordova-plugin-buildinfo": "^1.1.0",
    "cordova-plugin-camera": "^2.4.1",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-console": "^1.1.0",
    "cordova-plugin-customurlscheme": "^4.3.0",
    "cordova-plugin-device": "^1.1.7",
    "cordova-plugin-facebook4": "^1.9.1",
    "cordova-plugin-fcm": "^2.1.2",
    "cordova-plugin-file": "^4.3.3",
    "cordova-plugin-file-transfer": "^1.6.3",
    "cordova-plugin-geolocation": "^2.4.3",
    "cordova-plugin-googlemaps": "^2.1.1",
    "cordova-plugin-nativestorage": "^2.2.2",
    "cordova-plugin-network-information": "^1.3.4",
    "cordova-plugin-splashscreen": "^4.1.0",
    "cordova-plugin-statusbar": "^2.3.0",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-promise-polyfill": "0.0.2",
    "cordova-universal-links-plugin": "^1.2.1",
    "firebase": "^4.6.0",
    "ionic-angular": "3.9.2",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "rxjs": "^5.5.5",
    "sw-toolbox": "3.6.0",
    "tslint": "~5.7.0",
    "typescript": "~2.4.2",
    "zone.js": "0.8.18"
  },


  "devDependencies": {
    "@angular/cli": "^1.6.1",
    "@angular/compiler-cli": "^5.0.3",
    "@ionic/app-scripts": "3.1.5",
    "@ngtools/webpack": "^1.1.2",
    "@types/jasmine": "2.8.2",
    "@types/node": "8.0.57",
    "codecov": "^1.0.1",
    "codelyzer": "^4.0.1",
    "connect": "3.6.0",
    "jasmine": "^2.8.0",
    "jasmine-core": "^2.8.0",
    "jasmine-spec-reporter": "^3.2.0",
    "karma": "^1.7.1",
    "karma-chrome-launcher": "^2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.3.0",
    "karma-jasmine": "^1.0.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-mocha-reporter": "^2.2.4",
    "karma-remap-istanbul": "^0.4.0",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "tslint-eslint-rules": "4.1.1",
    "typescript": "^2.4.2"
  },

提前感谢

我认为这个错误是由于最近的firebase软件包发行版(4.8.1)导致的,在该版本中,他们重构了打字设置。将firebase软件包强制升级到4.8.0版应该可以解决您的问题。

我认为这个错误是由于firebase软件包最新版本(4.8.1)导致的,在该版本中,他们重构了键入设置。将firebase软件包强制升级到4.8.0版应该可以解决您的问题。

您是否检查了文件
@firebase/app types/private
是否存在?可能您需要重新安装这些软件包。您是否检查了文件
@firebase/app types/private
是否存在?也许你需要重新安装这些软件包。我实际上已降级到^4.6.0,但我会尝试你的回答。这就是诀窍,非常感谢@timsuldatI实际上已降级到^4.6.0,但我会尝试你的回答。这是诀窍,非常感谢@timsuldat