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'.
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'.
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
This is the answer sir add skipLibCheck=true in tsconfig.json
{ //... compilerOptions: { "skipLibCheck": true, //... } }