angularfire
angularfire copied to clipboard
initializeApp
The "Firebase Options" interface of the "initializeApp" function does not have the "locationId" attribute.
"dependencies": { "@angular/animations": "^16.2.0", "@angular/cdk": "^16.2.10", "@angular/common": "^16.2.0", "@angular/compiler": "^16.2.0", "@angular/core": "^16.2.0", "@angular/fire": "^16.0.0", "@angular/forms": "^16.2.0", "@angular/material": "^16.2.10", "@angular/platform-browser": "^16.2.0", "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" },
"...Object literal may only specify known properties, and 'locationId' does not exist in type 'FirebaseOptions'.
Overload 2 of 3, '(options: FirebaseOptions, config?: FirebaseAppSettings | undefined): FirebaseApp', gave the following error. Argument of type '{ projectId: string; appId: string; storageBucket: string; locationId: string; apiKey: string; authDomain: string; messagingSenderId: string; measurementId: string; }' is not assignable to parameter of type 'FirebaseOptions'. Object literal may only specify known properties, and 'locationId' does not exist in type 'FirebaseOptions'.ts(2769)"
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Hey, you just have to remove locationId and it's value from the app.module.ts, for some reason they managed to initialize it even though it's not needed, after that you're app should compile just fine
As pointed out by @Hendercraft this will simply resolve your issue. And if it has please close this issue.
thanks
https://firebase.google.com/docs/reference/js/app.firebaseoptions.md#firebaseoptions_interface does not include locationId as an option.
A fix for this issue would be either:
- If
"locationId"is truly not needed, make it so that runningng add @angular/firedoes not add the field to theApplicationConfiginapp.config.ts. - Update
FirebaseOptionsto includelocationId, and update the Firebase docs to document this field.