1
我們正在離子平臺2上開發一個開源應用程序,有人將Firebase添加到項目中,並且我提出了請求,現在當我嘗試運行我獲得的應用程序時這個錯誤。這可能與某些Firebase依賴項或軟件包有關。我怎樣才能解決這個問題?Module''*''沒有導出成員'app'
幾乎所有與Firebase相關的行都會出現此錯誤。例如:
export declare function _getAuthBackend(app: firebase.app.App): FirebaseSdkAuthBackend;
這裏是代碼:
import * as firebase from 'firebase';
import { Observable } from 'rxjs/Observable';
export declare abstract class AuthBackend {
abstract authWithCustomToken(token: string): Promise<FirebaseAuthState>;
abstract authAnonymously(options?: any): Promise<FirebaseAuthState>;
abstract authWithPassword(credentials: EmailPasswordCredentials): Promise<FirebaseAuthState>;
abstract authWithOAuthPopup(provider: AuthProviders, options?: any): Promise<firebase.auth.UserCredential>;
abstract authWithOAuthRedirect(provider: AuthProviders, options?: any): Promise<void>;
abstract authWithOAuthToken(credentialsObj: firebase.auth.AuthCredential, options?: any): Promise<FirebaseAuthState>;
abstract onAuth(): Observable<FirebaseAuthState>;
abstract getAuth(): FirebaseAuthState;
abstract unauth(): Promise<void>;
abstract createUser(credentials: EmailPasswordCredentials): Promise<FirebaseAuthState>;
abstract getRedirectResult(): Observable<firebase.auth.UserCredential>;
}
export declare enum AuthProviders {
Github = 0,
Twitter = 1,
Facebook = 2,
Google = 3,
Password = 4,
Anonymous = 5,
Custom = 6,
}
export declare enum AuthMethods {
Popup = 0,
Redirect = 1,
Anonymous = 2,
Password = 3,
OAuthToken = 4,
CustomToken = 5,
}
export interface AuthConfiguration {
method?: AuthMethods;
provider?: AuthProviders;
scope?: string[];
}
export interface FirebaseAuthState {
uid: string;
provider: AuthProviders;
auth: firebase.User;
expires?: number;
github?: firebase.UserInfo;
google?: firebase.UserInfo;
twitter?: firebase.UserInfo;
facebook?: firebase.UserInfo;
anonymous?: boolean;
}
export declare function authDataToAuthState(authData: firebase.User, providerData?: firebase.UserInfo): FirebaseAuthState;
export declare function stripProviderId(providerId: string): string;
export interface EmailPasswordCredentials {
email: string;
password: string;
}
您需要展示更多關於您的組件的代碼? – Sampath
@Sampath無論如何都是節點模塊代碼,但我添加了 –
你可以顯示你的'package.json'文件嗎? – Sampath