Issue running $ ionic build –prod due to firebase

#1

Hello Everyone

I have an issue when i am running command “ionic build --prod” and getting following error

D:\project\tushar\code\zihop3>ionic build  --prod
Running app-scripts build: --prod
[11:56:58]  build prod started ...
[11:56:59]  clean started ...
[11:56:59]  clean finished in 51 ms
[11:56:59]  copy started ...
[11:57:03]  deeplinks started ...
[11:57:04]  deeplinks finished in 620 ms
[11:57:04]  ngc started ...
[11:57:32]  typescript error
            Cannot write file 'D:/project/tushar/code/zihop3/node_modules/@firebase/auth/dist/auth.js' because it would

            overwrite input file.

[11:57:32]  typescript error
            Cannot write file 'D:/project/tushar/code/zihop3/node_modules/firebase/auth/index.js' because it would
            overwrite input file.

[11:57:32]  typescript error
            Cannot write file 'D:/project/tushar/code/zihop3/node_modules/firebase/database/index.js' because it would
            overwrite input file.

Error: The Angular AoT build failed. See the issues above
    at D:\project\tushar\code\zihop3\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:232:55
    at step (D:\project\tushar\code\zihop3\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)
    at Object.next (D:\project\tushar\code\zihop3\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:13:53)
    at fulfilled (D:\project\tushar\code\zihop3\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:4:58)
    at <anonymous>
[11:57:32]  copy finished in 33.28 s

Here is my package.json info

 "dependencies": {
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "5.0.3",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@ionic-native/app-rate": "^4.5.3",
    "@ionic-native/camera": "4.3.3",
    "@ionic-native/core": "^4.5.3",
    "@ionic-native/email-composer": "^4.1.0",
    "@ionic-native/facebook": "4.4.2",
    "@ionic-native/file": "^4.5.3",
    "@ionic-native/file-transfer": "^4.5.3",
    "@ionic-native/google-analytics": "^4.1.0",
    "@ionic-native/google-plus": "4.4.2",
    "@ionic-native/in-app-purchase": "^4.9.0",
    "@ionic-native/local-notifications": "^4.5.3",
    "@ionic-native/media": "^4.5.3",
    "@ionic-native/native-audio": "^4.1.0",
    "@ionic-native/network": "^4.5.2",
    "@ionic-native/splash-screen": "4.4.0",
    "@ionic-native/status-bar": "4.4.0",
    "@ionic-native/twitter-connect": "4.4.2",
    "@ionic/storage": "2.1.3",
    "@ngx-translate/core": "^8.0.0",
    "@ngx-translate/http-loader": "^2.0.0",
    "angularfire2": "5.0.0-rc.4",
    "cordova": "^7.1.0",
    "cordova-android": "^7.1.0",
    "cordova-android-support-gradle-release": "^1.4.4",
    "cordova-ios": "^4.5.4",
    "cordova-plugin-app-event": "^1.2.1",
    "cordova-plugin-apprate": "^1.4.0",
    "cordova-plugin-console": "^1.1.0",
    "cordova-plugin-crosswalk-webview": "^2.4.0",
    "cordova-plugin-device": "^1.1.7",
    "cordova-plugin-dialogs": "^2.0.1",
    "cordova-plugin-email-composer": "^0.8.15",
    "cordova-plugin-file": "^6.0.1",
    "cordova-plugin-file-transfer": "^1.7.1",
    "cordova-plugin-globalization": "^1.11.0",
    "cordova-plugin-google-analytics": "^1.8.3",
    "cordova-plugin-googleplus": "~5.1.1",
    "cordova-plugin-inappbrowser": "^3.0.0",
    "cordova-plugin-inapppurchase": "^1.2.0",
    "cordova-plugin-media": "^5.0.2",
    "cordova-plugin-nativeaudio": "^3.0.9",
    "cordova-plugin-nativestorage": "^2.3.2",
    "cordova-plugin-network-information": "^1.3.4",
    "cordova-plugin-splashscreen": "^4.1.0",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "^2.3.3",
    "de.appplant.cordova.plugin.local-notification": "^0.8.5",
    "firebase": "4.6.2",
    "ionic-angular": "3.9.2",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "moment": "^2.20.1",
    "npm": "^5.6.0",
    "promise-polyfill": "^6.0.2",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "tslint": "^5.8.0",
    "twitter-connect-plugin": "~0.6.0",
    "webpack": "^2.2.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.5",
    "typescript": "2.4.2",
    "ws": "3.3.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-console": {},
      "cordova-plugin-device": {},
      "cordova-plugin-email-composer": {},
      "cordova-plugin-google-analytics": {},
      "cordova-plugin-nativeaudio": {},
      "cordova-plugin-network-information": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-whitelist": {},
      "cordova-sqlite-storage": {},
      "ionic-plugin-keyboard": {},
      "de.appplant.cordova.plugin.local-notification": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-file": {},
      "cordova-plugin-media": {},
      "cordova-plugin-crosswalk-webview": {
        "XWALK_VERSION": "23+",
        "XWALK_LITEVERSION": "xwalk_core_library_canary:17+",
        "XWALK_COMMANDLINE": "--disable-pull-to-refresh-effect",
        "XWALK_MODE": "embedded",
        "XWALK_MULTIPLEAPK": "true"
      },
      "cordova-android-support-gradle-release": {
        "ANDROID_SUPPORT_VERSION": "27.+"
      },
      "cordova-plugin-inapppurchase": {},
      "cordova-plugin-apprate": {}
    },
    "platforms": [
      "ios",
      "android"
    ]
  }

Here is my ionic info


cli packages: (C:\Users\jayesh\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.5
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.11.3
    npm  : 4.6.1
    OS   : Windows 7

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

If anyone has a solution for this issue let me know. Thanks is advance.

#2

There is a more recent version - maybe upgrading this is enough.