angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

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'.

Open kenken64 opened this issue 8 years ago • 32 comments

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'.

kenken64 avatar May 25 '18 09:05 kenken64

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

jamesdaniels avatar May 25 '18 22:05 jamesdaniels

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.

hipsterreed avatar May 25 '18 23:05 hipsterreed

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

edit: firebase 5.0.4 does it.

MohitKS5 avatar May 26 '18 09:05 MohitKS5

5.0.3+

On Sat, May 26, 2018, 2:26 AM mohit kumar singh [email protected] 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 .

jamesdaniels avatar May 27 '18 08:05 jamesdaniels

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.

gashho avatar Jun 03 '18 18:06 gashho

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'.

ghost avatar Jun 03 '18 19:06 ghost

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" },

malindakpt avatar Jun 04 '18 17:06 malindakpt

I have the same problem :(

ZdebK avatar Jun 04 '18 19:06 ZdebK

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]

jsariasgeek avatar Jun 05 '18 05:06 jsariasgeek

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

technbuzz avatar Jun 07 '18 07:06 technbuzz

Yes, you´re right

jsariasgeek avatar Jun 07 '18 16:06 jsariasgeek

omg ! can we have a backward compatible version ?

kenken64 avatar Jun 09 '18 15:06 kenken64

I got the same error fixed with the following version combination

  • angularfire2 5.0.0-rc.7
  • firebase 4.12.1

cfkarthick avatar Jun 09 '18 19:06 cfkarthick

@cfkarthick Thanks! Worked for me!

tiago-lp avatar Jun 09 '18 22:06 tiago-lp

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

kenken64 avatar Jun 10 '18 02:06 kenken64

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

andreagosto avatar Jun 10 '18 08:06 andreagosto

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

technbuzz avatar Jun 10 '18 11:06 technbuzz

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 ?

kenken64 avatar Jun 10 '18 23:06 kenken64

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?

ThaSaltyDawg avatar Jun 21 '18 11:06 ThaSaltyDawg

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

asmaa3107 avatar Jun 21 '18 15:06 asmaa3107