4
votes

I am attempting to setup a new site in Angular 4. I want to use Firebase as a database backend.

I am using the install guide found here: https://github.com/angular/angularfire2/blob/master/docs/1-install-and-setup.md

However, when I execute ng serve --open I am getting this error:

ERROR in Error encountered resolving symbol values statically. Calling function 'OpaqueToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol FirebaseUserConfig in C:/Source/node_modules/angularfire2/tokens.d.ts, resolving symbol AngularFireModule.initializeApp in C:/Source/node_modules/angularfire2/angularfire2.d.ts, resolving symbol AppModule in C:/Source/src/app/app.module.ts, resolving symbol AppModule in C:/Source/src/app/app.module.ts

As I am rather a novice with Angular, I am not sure how to resolve this error.

1
npm uninstall firebase angularfire2 --save npm install firebase angularfire2 --save seems to fixed the issue for now. Does anyone have any ETA when AngularFire2 will officially support Angular 4? - eat-sleep-code

1 Answers

4
votes

You may try below link: https://github.com/angular/angularfire2/blob/master/docs/version-4-upgrade.md

AngularFire2 4.0 is a refactor of the AngularFire2 package which implements @NgModule, simplifies authentication, and better supports Angular 4.