hi,
I am trying to make angularfire2 work with latest ionic rc 2.0.0.
npm install angularfire2 firebase --save worked very well.
but when i do ionic serve
getting below error
D:\Tushar\Projects\ionic2Sample>ionic serve
Running ‘serve:before’ npm script before serve
ionic-hello-world@ watch D:\Tushar\Projects\ionic2Sample
ionic-app-scripts watch
[12:27:27] ionic-app-scripts 0.0.23
[12:27:27] watch started …
[12:27:27] build dev started …
[12:27:27] clean started …
[12:27:27] clean finished in 16 ms
[12:27:27] copy started …
[12:27:27] typescript compiler started …
[12:27:27] lint started …
[12:27:27] copy finished in 97 ms
[12:27:28] lint finished in 1.02 s
[12:27:41] Error: Module D:\Tushar\Projects\ionic2Sample\node_modules\angularfi
re2\node_modules\firebase\firebase-browser.js does not export initializeApp (imp
orted by D:\Tushar\Projects\ionic2Sample\node_modules\angularfire2\angularfire2.
js)
at Module.trace (D:\Tushar\Projects\ionic2Sample\node_modules\rollup\dist\ro
llup.js:7677:29)
at ModuleScope.findDeclaration (D:\Tushar\Projects\ionic2Sample\node_modules
\rollup\dist\rollup.js:7300:22)
at Scope.findDeclaration (D:\Tushar\Projects\ionic2Sample\node_modules\rollu
p\dist\rollup.js:5351:39)
at CallExpression.bind (D:\Tushar\Projects\ionic2Sample\node_modules\rollup
dist\rollup.js:5826:28)
at D:\Tushar\Projects\ionic2Sample\node_modules\rollup\dist\rollup.js:5151:5
0
at ReturnStatement.eachChild (D:\Tushar\Projects\ionic2Sample\node_modules\r
ollup\dist\rollup.js:5168:5)
at ReturnStatement.bind (D:\Tushar\Projects\ionic2Sample\node_modules\rollup
\dist\rollup.js:5151:7)
at BlockStatement.bind (D:\Tushar\Projects\ionic2Sample\node_modules\rollup
dist\rollup.js:5617:9)
at FunctionDeclaration.bind (D:\Tushar\Projects\ionic2Sample\node_modules\ro
llup\dist\rollup.js:6405:13)
at ExportNamedDeclaration.bind (D:\Tushar\Projects\ionic2Sample\node_modules
\rollup\dist\rollup.js:6223:44)
[12:27:32] typescript compiler ready in 5.40 s
[12:27:32] bundle dev started …
[12:27:41] sass started …
[12:27:43] sass finished in 2.19 s
[12:27:43] build dev finished in 15.96 s
[12:27:43] watch ready in 16.02 s
Running live reload server: http://localhost:35729
Watching: www//*, !www/lib//, !www/**/.map
√ Running dev server: http://localhost:8100
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit
ionic $
app.module.ts
export const firebaseConfig = {
apiKey: ‘xxx’,
authDomain: ‘xxx’,
databaseURL: ‘xxx’,
storageBucket: ‘xxx’
};
@NgModule({
declarations: [
MyApp,
AboutPage,
ContactPage,
HomePage,
TabsPage
],
imports: [
BrowserModule,
AngularFireModule.initializeApp(firebaseConfig),
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
AboutPage,
ContactPage,
HomePage,
TabsPage
],
providers:
})
export class AppModule { }
is it something related to angular fire 2 ?
