angularfire: 'OpaqueToken', function calls are not supported

Version info Angular: 4.0.0-rc.1 Firebase: 3.6.9 AngularFire: 2.0.0-beta.8 Angular/cli : 1.0.0-rc.0

When I run my app using ng serve, I got this following 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 refer
ence to an exported function, resolving symbol FirebaseUserConfig in _path_/node_modules/angularfire2/tokens.d.ts, resolving symbol AngularFireModule.initialize
App in _path_/node_modules/angularfire2/angularfire2.d.ts, resolving symbol AppModule in _path_/src/app/app.module.ts, resolving symbol A
ppModule in *path*/src/app/app.module.ts

If I modify any file which produce a reload of the build, the error disappear and my app works.

I think it’s because the OpaqueToken is deprecated in the new Angular 4.x

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 13
  • Comments: 28 (3 by maintainers)

Most upvoted comments

Just to let you know that I have uninstalled firebase and angularfire2 and reinstalled both which fixed the app working.

npm uninstall firebase angularfire2 --save npm install firebase angularfire2 --save

@jogelin @jakehockey10 @ravivit9 @LanderBeeuwsaert @zero19

The next release should fix this, but it also contains breaking changes from issue #854.

npm i angularfire2@next --save

@jogelin yes it is weird. I am running Angular 4.0 now, and gets the same error. Edit any file and recompiles ok.

this error is frustrating man.

@davideast Is there a temporary fix for this which I can use?