I am getting the below error while working with angular and firebase:
Typescript Error
Cannot find namespace 'firebase'.
C:/Users/DELL/Desktop/connect/withfire/node_modules/angularfire2/auth/auth.d.ts
app: FirebaseApp;
readonly auth: firebase.auth.Auth;
readonly authState: Observable<firebase.User | null>;
I am getting the below error while working with angular and firebase:
Typescript Error
Cannot find namespace 'firebase'.
C:/Users/DELL/Desktop/connect/withfire/node_modules/angularfire2/auth/auth.d.ts
app: FirebaseApp;
readonly auth: firebase.auth.Auth;
readonly authState: Observable<firebase.User | null>;
Share
Improve this question
edited Jun 20, 2020 at 9:12
CommunityBot
11 silver badge
asked Dec 26, 2017 at 16:18
Ram2Ram2
311 silver badge3 bronze badges
4 Answers
Reset to default 4You need to downgrade firebase version.
Try this: $ npm install -s [email protected]
4.8.1 was a refactor of the typings and you now pull your imports from @firebase:
import { FirebaseApp } from '@firebase/app-types';
import { FirebaseAuth } from '@firebase/auth-types';
import { FirebaseDatabase } from '@firebase/database-types';
import { FirebaseMessaging } from '@firebase/messaging-types';
import { FirebaseStorage } from '@firebase/storage-types';
import { FirebaseFirestore } from '@firebase/firestore-types';
import what ever module you need
npm install [email protected] --save-dev
Update: 29-01-2018
This worked for me