Typescript Error Module '" Source/node_modules/firebase/index"' has no exported member 'functions'
阿新 • • 發佈:2018-11-08
錯誤資訊:
Error
Close
Typescript Error
Module '"D:/Source/node_modules/firebase/index"' has no exported member 'functions'.
D:/Source/node_modules/@angular/fire/firebase.app.module.d.ts
import { InjectionToken } from '@angular/core'; | |
import { app, auth, database, firestore, functions, messaging, storage } from 'firebase/app'; | |
export declare type FirebaseOptions = { |
Ionic Framework: 3.8.0 Ionic Native: 2.9.0 Ionic App Scripts: 3.2.0 Angular Core: 4.4.3 Angular Compiler CLI: 4.4.3 Node: 8.11.3 OS Platform: Windows 10 Navigator Platform: Win32 User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
解決辦法:
修改firebase版本,把"firebase": "^4.6.1",改為"firebase": "^5.5.7",
修改angular版本,把所有4.4.3改為5.0.0,例如:"@angular/common": "4.4.3",改為"@angular/common": "5.0.0",
修改rxjs版本,把"rxjs": "5.4.2",改為"rxjs": "5.5.2",