-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AngularFire 17.1.0 breaks - Argument of type 'EnvironmentProviders' is not assignable to parameter of type 'ImportProvidersSource' #3526
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Oh fun, that shouldn't have broken... sorry probably should have saved that one for v18. You can pull the "provideFirebase" functions outside of the |
Thank you for the fast reply, that worked! |
I'm sorry I didn't understand this - if I pull all the @angular/fire providers outside the importProvidersFrom function, and add them to the providers array directly, the error stays the same (on v18, both NG and Fire).. any help? Here is my firebase config:
|
simple example for app.config.ts (Angular 18).
As you can see, both provideFirebaseApp as well as provideFirestore are not inside the importProvidersFrom function, like required before and you are using in your example above, that was meant with "pull outside importProvidersFrom". Does this help? |
@schreibse thanks, that is what I tried but got the same issue.. I'll give it another shot.. thank you so much |
yes, everything related to firebase has to be pulled out of It might help to read the steps/code of the AngularFire web codelab |
It was working fine with angular < 18, I just upgraded to angular 18 and facing this error: [ERROR] TS2345: Argument of type 'EnvironmentProviders' is not assignable to parameter of type 'ImportProvidersSource'. [plugin angular-compiler] |
@schreibse I am on ng18 btw |
yes, hence this issue. Did you try the proposed solution It works fine after extracting everything firebase related from
After I encountered the error I found this issue with the working solution. Please share your |
Hey guys, I managed now by pulling the calls out, as suggested. Previously I got errros when doing so but it works now, thank you all for good suggestions. Edit: I see now that the error I had was fixed with the newly added version 18.0.1 #3536 |
@schreibse it seems to be working with @angular/fire 18.0.1 |
Version info
Angular:
Firebase:
AngularFire:
Other (e.g. Ionic/Cordova, Node, browser, operating system):
How to reproduce these conditions
Compile app with AngularFire 17.0.1 everything works, compile against 17.1.0, it results in the error message:
Relevant code in main.ts
I can just keep using 17.0.1 for now as i don't really need the Vertex AI wrapper yet
The text was updated successfully, but these errors were encountered: