Angular: 4.0.1
Firebase: 3.9.0
AngularFire: 4.0.0-rc.0
** Errors in the JavaScript console **
WARNING in ./src/app/app.module.ts
31:14-27 "export 'AuthProviders' was not found in 'angularfire2'
WARNING in ./src/app/app.module.ts
32:12-23 "export 'AuthMethods' was not found in 'angularfire2'
WARNING in ./src/app/app.component.ts
29:57-68 "export 'AngularFire' was not found in 'angularfire2'
WARNING in ./src/app/app.component.ts
29:88-99 "export 'AngularFire' was not found in 'angularfire2'
WARNING in ./src/app/google-api.service.ts
217:57-68 "export 'AngularFire' was not found in 'angularfire2'
WARNING in ./src/app/google-api.service.ts
217:88-99 "export 'AngularFire' was not found in 'angularfire2'
ERROR in /Users/vanderbergha/Firebase-Projects/brilliant-badger/src/app/google-api.service.ts (5,10): Module '"/Users/vanderbergha/Firebase-Projects/brilliant-badger/node_modules/angularfire2/index"' has no exported member 'AngularFire'.
ERROR in /Users/vanderbergha/Firebase-Projects/brilliant-badger/src/app/app.component.ts (2,10): Module '"/Users/vanderbergha/Firebase-Projects/brilliant-badger/node_modules/angularfire2/index"' has no exported member 'AngularFire'.
/Users/vanderbergha/Firebase-Projects/brilliant-badger/src/app/app.component.ts (2,23): Module '"/Users/vanderbergha/Firebase-Projects/brilliant-badger/node_modules/angularfire2/index"' has no exported member 'FirebaseListObservable'.
ERROR in /Users/vanderbergha/Firebase-Projects/brilliant-badger/src/app/app.module.ts (6,29): Module '"/Users/vanderbergha/Firebase-Projects/brilliant-badger/node_modules/angularfire2/index"' has no exported member 'AuthProviders'.
/Users/vanderbergha/Firebase-Projects/brilliant-badger/src/app/app.module.ts (6,44): Module '"/Users/vanderbergha/Firebase-Projects/brilliant-badger/node_modules/angularfire2/index"' has no exported member 'AuthMethods'.
/Users/vanderbergha/Firebase-Projects/brilliant-badger/src/app/app.module.ts (48,53): Argument of type '{ provider: any; method: any; }' is not assignable to parameter of type 'string'.
There are some API-changes in v4.
https://github.com/angular/angularfire2/blob/master/docs/version-4-upgrade.md
@avanderbergh We changed the API to make it easily tree-shakable. You are now required to explicitly import the features you need as an NgModule. We also removed the pre-configured auth features and defaulted to Firebase Authentication's methods to stick to one API.
See #854 for the initial proposal and the migration guide for reference.
@davideast I am having a similar problem can you please help me fix. I am like struggling because of this.
[23:00:27] typescript: C:/Users/Harsha Varun/MyIonicProject/src/pages/third/third.ts, line: 4
Module '"C:/Users/Harsha Varun/MyIonicProject/node_modules/angularfire2/index"' has no exported member
'AuthProviders'.
L3: import {FourthPage} from '../fourth/fourth';
L4: import { AuthProviders, AuthMethods, AngularFire } from 'angularfire2';
[23:00:27] typescript: C:/Users/Harsha Varun/MyIonicProject/src/pages/third/third.ts, line: 4
Module '"C:/Users/Harsha Varun/MyIonicProject/node_modules/angularfire2/index"' has no exported member
'AuthMethods'.
L3: import {FourthPage} from '../fourth/fourth';
L4: import { AuthProviders, AuthMethods, AngularFire } from 'angularfire2';
[23:00:27] typescript: C:/Users/Harsha Varun/MyIonicProject/src/pages/third/third.ts, line: 4
Module '"C:/Users/Harsha Varun/MyIonicProject/node_modules/angularfire2/index"' has no exported member
'AngularFire'.
L3: import {FourthPage} from '../fourth/fourth';
L4: import { AuthProviders, AuthMethods, AngularFire } from 'angularfire2';
package.json
"name": "MyIonicProject",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.1.0",
"@angular/compiler": "4.1.0",
"@angular/compiler-cli": "4.1.0",
"@angular/core": "4.1.0",
"@angular/forms": "4.1.0",
"@angular/http": "4.1.0",
"@angular/platform-browser": "4.1.0",
"@angular/platform-browser-dynamic": "4.1.0",
"": "3.7.0",
"": "3.7.0",
"": "3.7.0",
"": "2.0.1",
"angularfire2": "^4.0.0-rc.0",
"firebase": "^4.0.0",
"ionic-angular": "3.2.1",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.10"
},
"devDependencies": {
"": "1.3.7",
"": "1.1.2",
"": "1.1.2",
"angularfire2": "^4.0.0-rc.0",
"typescript": "2.2.1"
},
"description": "An Ionic project"
}
Thanks in advance
Most helpful comment
@avanderbergh We changed the API to make it easily tree-shakable. You are now required to explicitly import the features you need as an NgModule. We also removed the pre-configured auth features and defaulted to Firebase Authentication's methods to stick to one API.
See #854 for the initial proposal and the migration guide for reference.