Error in building after adding angularfire to my ionic application

after adding angularfilre to my ionic 3 application

it makes this error - when trying to build the application - how to fix it quickly , thanks

Are you using AngularFire2 ?

Can you show your Package.json?

Seeya

No - AngularFire4
FYI , this error display after this line , “webpack started”

here’s it

{
    "name": "gallery",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular/common": "4.1.3",
        "@angular/compiler": "4.1.3",
        "@angular/compiler-cli": "4.1.3",
        "@angular/core": "4.1.3",
        "@angular/forms": "4.1.3",
        "@angular/http": "4.1.3",
        "@angular/platform-browser": "4.1.3",
        "@angular/platform-browser-dynamic": "4.1.3",
        "@ionic-native/admob-free": "^4.0.1",
        "@ionic-native/core": "3.12.1",
        "@ionic-native/splash-screen": "3.12.1",
        "@ionic-native/status-bar": "3.12.1",
        "@ionic/storage": "^2.0.1",
        "angularfire2": "^4.0.0-rc0",
        "cordova-admob-sdk": "^0.7.0",
        "cordova-android": "^6.2.3",
        "cordova-plugin-admob-free": "^0.9.0",
        "cordova-plugin-console": "^1.0.5",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.2",
        "cordova-plugin-whitelist": "^1.3.1",
        "cordova-promise-polyfill": "0.0.2",
        "cordova-sqlite-storage": "^2.0.4",
        "firebase": "^4.1.3",
        "ionic-angular": "3.5.3",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.12"
    },
    "devDependencies": {
        "@ionic/app-scripts": "2.0.2",
        "@ionic/cli-plugin-cordova": "1.4.1",
        "@ionic/cli-plugin-ionic-angular": "1.3.2",
        "typescript": "2.3.4"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-sqlite-storage": {},
            "cordova-plugin-admob-free": {},
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {}
        },
        "platforms": [
            "android"
        ]
    }
}

npm install promise-polyfill --save-exact

3 Likes

I was talking about package name… but everything seems right…

How did you declared angularfire on your service and app.module?

pliablepixels is correct. There is an issue in the node dependencies in Firebase not including the promise-polyfill module. Just run npm i promise-polyfil --save-exactl and you should be good to go.

2 Likes

Thanks - you solved it :+1: