I was running the application using \"ng serve\" it was working fine.
But after I built the app using \"npm run build:ssr\", The app got built successfully.
I use "@angular/fire": "^5.2.0-beta.3", instead of "angularfire2": "^5.1.0" I am facing the same issue, after implementing "AngularFirePerformanceModule", I removed it; import { AngularFirePerformanceModule } from '@angular/fire/performance'; and the issue went away.