Ionic build failed. angularfire2 5.0.0-rc.3 error

Hi All,

I have probably looked and tried all topics related to failure of ionic cordova build --prod --release which specifies angularfire2 problem. I do not want to go down to angularfire2 Ver4 (since it requires code changes on several files). I am unable to find a solution fir angularfire2 Ver5. This is not a problem with AngularFire Team

Following is my ionic info:

 @ionic/cli-utils  : 1.15.2
    ionic (Ionic CLI) : 3.15.2

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.6.0


    Node : v6.11.1
    npm  : 5.5.1
    OS   : Windows 10

Environment Variables:

    ANDROID_HOME : not set