angularfire: @angular/fire throws Error: Module not found: Error: Default condition should be last one

I’ve been using AngularCrashlytics(from @angular/fire) for a while interestingly since this morning I became unable to get either build or ng serve which throws error as below.Can someone help me to get rid of this?

image On the app.module I’ve already added @angular/fire releated configuration steps as below(taken from https://github.com/angular/angularfire/blob/master/docs/analytics/getting-started.md)

import { AngularFireModule } from '@angular/fire/compat';
import { AngularFireAnalyticsModule } from '@angular/fire/compat/analytics';

imports:[
AngularFireModule.initializeApp(environment.Tools.Firebase)//firebase releated config,
AngularFireAnalyticsModule
]

I have configuration mentioned as below image

Dependency versions from package.json

"firebase": "^9.14.0",
"@angular/fire": "^7.4.1"

Additional Note : Already cloned project from scratch many times have tried deleting node modules folder and npm install besides tried to upgrade both firebase and @angular/fire to the latest versions which didn’t fix the issue.

See the stacloverflow ticket: https://stackoverflow.com/questions/75335661/angular-fire-throws-error-module-not-found-error-default-condition-should-be

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 9
  • Comments: 21

Most upvoted comments

Fixed with the release of firebase version 9.17.1. They also update the release notes of 9.17.0 to notify people of the bug it contains. This ticket can be closed AFAIK!

Feels like this upstream PR might be the culprit, fix incoming.

I solved the problem with a downgrade of the 2 packages.

"firebase": "~9.9.2",
"@angular/fire": "~7.4.1"