Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while building "Cannot find namespace 'firebase'" #541

Closed
kanishkatn opened this issue Sep 21, 2016 · 4 comments
Closed

Error while building "Cannot find namespace 'firebase'" #541

kanishkatn opened this issue Sep 21, 2016 · 4 comments

Comments

@kanishkatn
Copy link

Hi,

I am getting the following error while building the project. Please help

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/database/database.d.ts:9:28
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/database/database.d.ts:10:30
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth.d.ts:15:39
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth.d.ts:16:51
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth.d.ts:16:91
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth.d.ts:17:50
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth.d.ts:17:118
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth.d.ts:20:55
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth_backend.d.ts:6:81
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth_backend.d.ts:8:48
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth_backend.d.ts:13:45
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth_backend.d.ts:41:10
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/providers/auth_backend.d.ts:61:54
Cannot find namespace 'firebase'.

ERROR in [default] /Users/kanishkanagaraj/JeetLab/BetMe/web/node_modules/angularfire2/utils/firebase_list_factory.d.ts:5:73
Cannot find namespace 'firebase'.

I am using the following
angular-cli: 1.0.0-beta.15
node: 6.6.0
os: darwin x64
npm: 3.10.7

@davideast
Copy link
Member

davideast commented Sep 21, 2016

Duplicate of #525. See the work around in the thread. We're working on a real solution.

@hiepxanh
Copy link
Contributor

import * as firebase from 'firebase';
on top of node_modules\angularfire2\angularfire2.d.ts
worked!

@mpeguero
Copy link

import * as firebase from 'firebase';
on top of node_modules\angularfire2\angularfire2.d.ts

This does not work.. same error

@reevr
Copy link

reevr commented Jan 9, 2018

I too had this problem and I tried adding " import * as firebase from 'firebase' " . This helped me to get the app compiled, but was throwing error while geting data from firebase.So removed that again.
And I just changed one line in app.module.ts as follows:
to import AngularFireDatabase I used import { AngularFireDatabase } from 'angularfire2/database-deprecated'; instead of import { AngularFireDatabase } from 'angularfire2/database';

This works fine and doesn't throw any error as of now.
Update : Need to downgrade firebase to 4.8.0
Set "firebase": "4.8.0" in package.json file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants