angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.67k stars 2.19k forks source link

Can't resolve all parameters for AngularFirestore #1206

Closed ankemp closed 6 years ago

ankemp commented 6 years ago

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
davideast commented 6 years ago

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

edvillareal26 commented 6 years ago

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

Angular@4.4.4 Firebase@4.5.0 AngularFire@5.0.0-rc.2

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

plackowski commented 6 years ago

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

Firebase@4.5.0 AngularFire@5.0.0-rc.2

ahmadalibaloch commented 6 years ago

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.

ankemp commented 6 years ago

@ahmadalibaloch AngularFirestore isn't a provider

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

ahmadalibaloch commented 6 years ago

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.

habib786 commented 6 years ago

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?

davideast commented 6 years ago

@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.

ahmadalibaloch commented 6 years ago

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

Shemahmforash commented 6 years ago

@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
ghost commented 6 years ago

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

jwuliger commented 6 years ago

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

brndex commented 6 years ago

any updates?

bdogan commented 6 years ago

same error using version 5.0.0-rc.3

davideast commented 6 years ago

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