Angularfire: ERROR in node_modules/angularfire2/firebase.app.module.d.ts(2,42): error TS2305: Module '"/home/kenneth/Projects/coinotc-wallet-api/wallet-mgmt-web/node_modules/firebase/index"' has no exported member 'functions'.

Created on 25 May 2018  Â·  31Comments  Â·  Source: angular/angularfire

Version info

Angular:
"@angular/animations": "^5.2.8",
"@angular/common": "5.0.3",
"@angular/compiler": "5.0.3",
"@angular/compiler-cli": "5.0.3",
"@angular/core": "5.0.3",
"@angular/forms": "5.0.3",
"@angular/http": "5.0.3",
"@angular/platform-browser": "5.0.3",
"@angular/platform-browser-dynamic": "5.0.3",
"@angular/router": "^5.1.3",

Firebase:
"@firebase/app": "^0.1.10",
"@firebase/app-types": "^0.3.1",
"firebase": "^4.13.1",

AngularFire:
"angularfire2": "^5.0.0-rc.7",

Other (e.g. Ionic/Cordova, Node, browser, operating system):
cli packages: (/usr/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.9
Cordova Platforms  : android 6.3.0 browser 5.0.3
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.11.2
npm               : 6.1.0 
OS                : Linux 4.13

Environment Variables:

ANDROID_HOME : /home/kenneth/Android/Sdk

Misc:

backend : pro

node v8.11.2

Ubuntu 16.04

Chrome Version 67.0.3396.62 (Official Build) (64-bit)

How to reproduce these conditions

Failing test unit, Plunkr, or JSFiddle demonstrating the problem

Steps to set up and reproduce

On the terminal just run ionic cordova build android

Sample data and security rules

<-- include/attach/link to some json sample data (or provide credentials to a sanitized, test Firebase project) -->

Debug output

* Errors in the JavaScript console *

* Output from firebase.database().enableLogging(true); *

* Screenshots *

Expected behavior

No compilation error when perform ionic cordova build android/ios

ERROR in node_modules/angularfire2/firebase.app.module.d.ts(2,42): error TS2305: Module '"/home/kenneth/Projects/coinotc-wallet-api/wallet-mgmt-web/node_modules/firebase/index"' has no exported member 'functions'.

Most helpful comment

There is a problem with "angularfire2": "^5.0.0-rc.10"
The solution for me was uninstall angularfire2^5.0.0-rc.10 and install angularfire2^5.0.0-rc.9

npm uninstall angularfire2
npm install [email protected]

All 31 comments

We'll need version information filled out and optimally a stackblitz demonstrating the issue, to help you debug.

For anyone else that runs across this issue it most likely has to do with your firebase version not being compatible with your angularfire2 version.

which firebase verion is to be compatible with latest 5.0.0-rc.10?

edit: firebase 5.0.4 does it.

5.0.3+

On Sat, May 26, 2018, 2:26 AM mohit kumar singh notifications@github.com
wrote:

which firebase verion is to be compatible with latest 5.0.0-rc.10?

—
You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
https://github.com/angular/angularfire2/issues/1688#issuecomment-392249403,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACvr5X_sy0jOND4zLqvzPrhK3GwyF2Iks5t2R-0gaJpZM4UNpLf
.

I am new in npm, I still get the same problem when I type "ng serve" even if my version are the latest, I need help please! thanks in advance.

Version:
[email protected]
[email protected]

Error message

ERROR in node_modules/angularfire2/firebase.app.module.d.ts(2,42): error TS2305: Module '"D:/NPM projects/excel2firestore/node_modules/firebase/index"' has no exported member 'functions'.

i ï½¢wdmï½£: Failed to compile.

I'm on the same version as gashho:
[email protected]
[email protected]
And I get these errors in a blank project with only angularfire2.

ERROR in node_modules/angularfire2/firebase.app.module.d.ts(2,10): error TS2305: Module '"C:/Users/Sander/Documents/GitHub/CFTS/node_modules/firebase/app/index"' has no exported member 'app'. node_modules/angularfire2/firebase.app.module.d.ts(2,15): error TS2305: Module '"C:/Users/Sander/Documents/GitHub/CFTS/node_modules/firebase/app/index"' has no exported member 'auth'. node_modules/angularfire2/firebase.app.module.d.ts(2,21): error TS2305: Module '"C:/Users/Sander/Documents/GitHub/CFTS/node_modules/firebase/app/index"' has no exported member 'database'. node_modules/angularfire2/firebase.app.module.d.ts(2,31): error TS2305: Module '"C:/Users/Sander/Documents/GitHub/CFTS/node_modules/firebase/app/index"' has no exported member 'firestore'. node_modules/angularfire2/firebase.app.module.d.ts(2,42): error TS2305: Module '"C:/Users/Sander/Documents/GitHub/CFTS/node_modules/firebase/app/index"' has no exported member 'functions'. node_modules/angularfire2/firebase.app.module.d.ts(2,53): error TS2305: Module '"C:/Users/Sander/Documents/GitHub/CFTS/node_modules/firebase/app/index"' has no exported member 'messaging'. node_modules/angularfire2/firebase.app.module.d.ts(2,64): error TS2305: Module '"C:/Users/Sander/Documents/GitHub/CFTS/node_modules/firebase/app/index"' has no exported member 'storage'.

These dependencies fixed the issue for me

"dependencies": {
"@angular/animations": "^6.0.3",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/router": "^6.0.3",
"angularfire2": "^5.0.0-rc.10",
"core-js": "^2.5.4",
"firebase": "^5.0.3",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
},

I have the same problem :(

There is a problem with "angularfire2": "^5.0.0-rc.10"
The solution for me was uninstall angularfire2^5.0.0-rc.10 and install angularfire2^5.0.0-rc.9

npm uninstall angularfire2
npm install [email protected]

But than you have to change rxjs version to 6.0 as well, which I don't want.

Yes, you´re right

omg ! can we have a backward compatible version ?

I got the same error fixed with the following version combination

  • angularfire2 5.0.0-rc.7
  • firebase 4.12.1

@cfkarthick Thanks! Worked for me!

This doesn't work for me angularfire2 5.0.0-rc.7
firebase 4.12.1

what a mash! but angularfire is not an official Angular lib?

I had to go back to old pc where the project is working with existing environment setup and continue developing from that machine.

I am experiencing this issue in ionic, so the next solution might be to create new project using ionic4 and move old project to new one

what if we need to launch our project asap ? tell my bosses ionic 3 need to upgrade to 4 need another 2 months re rest everything because of this silly bug ?

WOW, this just halts my work! Has there been any updates on this issue yet, and where can I be notified when it's fixed?

I tried to uninstall all packages globally then install it again and everything going well with me

is this due to versions of npm libraries not being compatible? If so what version of each package is good? Should I have a certain version on Nodejs and Angular and AngularFire and Rxjs and others?

wew, it work again with angular 6, firebase.5.1.0 and angularfire rc 11. You have to remove node_modules before npm install firebase angularfire2 --save

i tried angularfire2 5.0.0-rc.11 and firebase": 5.1.0
it doen´t work ,the error is "/node_modules/firebase/index"' has no exported member 'functions'."

I have the same error until have to delete node_modules/firebase and node_modules/angularfire2 with package.lock. You should check the package.json of the library in node_modules. It wont update event you install new one.

Also, I got the same error.
this is my dependencies:

"dependencies": {
    "@angular/animations": "^6.1.0",
    "@angular/common": "^6.1.0",
    "@angular/compiler": "^6.1.0",
    "@angular/core": "^6.1.0",
    "@angular/forms": "^6.1.0",
    "@angular/http": "^6.1.0",
    "@angular/platform-browser": "^6.1.0",
    "@angular/platform-browser-dynamic": "^6.1.0",
    "@angular/router": "^6.1.0",
    "angularfire2": "^5.0.0-rc.12",
    "core-js": "^2.5.4",
    "firebase": "^5.4.1",
    "rxjs": "^6.0.0",
    "zone.js": "~0.8.26"
  },

@malindakpt
i am using angular-cli: 6.1.0
I followed you, but got the same error.

what a mess... always this problem between JS libs.

So any solution so far?

1+

this solve for me
npm install node-pre-gyp -g

I was gone through same problem solved after lot efforts. It is because of npm version is not compatible with gprc version.
So we need to update the npm.

1 - npm update
2 - npm install

this solve my issue.
Thank you

There is a problem with "angularfire2": "^5.0.0-rc.10"
The solution for me was uninstall angularfire2^5.0.0-rc.10 and install angularfire2^5.0.0-rc.9

npm uninstall angularfire2
npm install [email protected]

I confirm this works, solution by @jsariasgeek

Was this page helpful?
0 / 5 - 0 ratings