Angularfire: Can't resolve all parameters for AngularFirestore

Created on 5 Oct 2017  路  15Comments  路  Source: angular/angularfire

Version info

Angular: 4.4.x

Firebase: 4.3.0

AngularFire: 5.0.0-RC.1

Output during ng build --aot --prod

 11% building modules 10/10 modules 0 activeWarning: Can't resolve all parameters for AngularFirestore in /XXXProjectPathXXX/node_modules/firestore/index.d.ts: ([object Object], ?). This will become an error in Angular v5.x
Warning: Can't resolve all parameters for AngularFirestore in /XXXProjectPathXXX/node_modules/angularfire2/firestore/index.d.ts: ([object Object], ?). This will become an error in Angular v5.x

Most helpful comment

@ankemp We're working on this and should have something in before the 5.0 release.

All 15 comments

@ankemp We're working on this and should have something in before the 5.0 release.

@davideast so far still having this error. Hope to see fix soon.

[email protected]
[email protected]
[email protected]

Output during --aot --prod

Warning: Can't resolve all parameters for AngularFirestore in /Users//Documents/Projects//node_modules/angularfire2/firestore/index.d.ts: ([object Object], ?). This will become an error in Angular v5.x

I have similar problem too

Uncaught Error: Can't resolve all parameters for AngularFirestore: ([object Object], ?).
at syntaxError (compiler.es5.js:1540)
at CompileMetadataResolver._getDependenciesMetadata (compiler.es5.js:14877)
at CompileMetadataResolver._getTypeMetadata (compiler.es5.js:14745)
at CompileMetadataResolver._getInjectableMetadata (compiler.es5.js:14731)
at CompileMetadataResolver.getProviderMetadata (compiler.es5.js:15021)
at compiler.es5.js:14950
at Array.forEach ()
at CompileMetadataResolver._getProvidersMetadata (compiler.es5.js:14911)
at CompileMetadataResolver.getNgModuleMetadata (compiler.es5.js:14566)
at JitCompiler._loadModules (compiler.es5.js:25630)

@angular/common: 4.1.1
@angular/compiler: 4.1.1
@angular/core: 4.1.1
@angular/forms: 4.1.1
@angular/http: 4.1.1
@angular/platform-browser: 4.1.1
@angular/platform-browser-dynamic: 4.1.1
@angular/router: 4.1.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.1.1

[email protected]
[email protected]

AngularFirestore is not a provider i know, but in a rename process I got the same error, For me it was occurring, in development ng server, when I had listed AngularFirestore in providers of one of my AngularModules.

providers: [MatSnackBar, AngularFirestore],

When I removed it from the providers, the error disappeared.

@ahmadalibaloch AngularFirestore isn't a provider

You just need to import the modules you want to use, in the case of firestore, AngularFirestoreModule

AngularFirestore is not a provider i know, but in a rename process, i mistakenly did it and got the same error, so I posted here that may be it could be of help for identification and resolution.

So is there any solution for it?
When I just import AngularFirestore in my component, the error was No provider for AngularFirestore and when I import it my app.module file and call it in provider array, I am getting this error Can't resolve all parameters for AngularFirestore: ([object Object], ?).
Does anyone have solution for this?

@habib786 This isn't something to worry about. It won't become an error until Angular 6 which is a long ways out. It also doesn't break your build. It has to do with the way the Angular CLI interprets namespaces, we're working on it.

@habib786 AngularFirestoreModule is the module which needs to be added in imports of your app.module file.

@davideast It seems that in the situation @habib786 described the warning suggests it will become an error in version 5 of angular, not version 6:

activeWarning: Can't resolve all parameters for AngularFirestore in /code/angular4/test-project/node_modules/angularfire2/firestore/index.d.ts: ([object Object], ?). This will become an error in Angular v5.x

I am getting this error using version ^5.0.0-rc.3

Hello, I am also getting this error on NG 5.0.0-rc.6

any updates?

same error using version 5.0.0-rc.3

This is not an error until Angular 6. It is just a warning. We will resolve it before the release.

Was this page helpful?
0 / 5 - 0 ratings