Erro Build em modo --Prod


#1

Olá pessoal,

depois que atualizei meu projeto para a mais nova versão do Ionic, sempre que vou executar o build --prod da erro.

Utilizo o seguinte código:

ionic cordova build android --prod

e o erro que aparece é esse:

 [WARN] Error occurred during command execution from a CLI plugin
        (@ionic/cli-plugin-cordova). Your plugins may be out of date.
 Error: Encountered undefined provider! Usually this means you have a circular de
 pendencies (might be caused by using 'barrel' index.ts files.

alguma solução para esse problema?

Segue meu package.json


{
    "name": "ionic-hello-world",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "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/app-rate": "^3.12.1",
        "@ionic-native/background-mode": "^3.12.1",
        "@ionic-native/core": "^3.10.2",
        "@ionic-native/diagnostic": "^3.12.1",
        "@ionic-native/facebook": "^3.12.1",
        "@ionic-native/geolocation": "^3.12.1",
        "@ionic-native/google-maps": "^3.12.1",
        "@ionic-native/in-app-browser": "^3.12.1",
        "@ionic-native/local-notifications": "^3.12.1",
        "@ionic-native/push": "^3.12.1",
        "@ionic-native/social-sharing": "^3.12.1",
        "@ionic-native/splash-screen": "3.10.2",
        "@ionic-native/status-bar": "^3.10.2",
        "@ionic-native/toast": "^3.12.1",
        "@ionic/cloud-angular": "^0.12.0",
        "@ionic/storage": "^2.0.1",
        "ionic-angular": "3.4.0",
        "ionicons": "3.0.0",
        "moment": "^2.18.1",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.12",
        "cordova-plugin-background-mode": "~0.7.2",
        "cordova-plugin-console": "1.0.5",
        "cordova-plugin-device": "1.1.4",
        "cordova-plugin-splashscreen": "~4.0.1",
        "cordova-plugin-statusbar": "2.2.1",
        "cordova-plugin-whitelist": "1.3.1",
        "cordova-sqlite-storage": "~2.0.1",
        "ionic-plugin-keyboard": "~2.2.1",
        "phonegap-plugin-push": "~1.9.2"
    },
    "devDependencies": {
        "@ionic/app-scripts": "1.3.7",
        "@ionic/cli-plugin-cordova": "1.4.0",
        "@ionic/cli-plugin-ionic-angular": "1.3.1",
        "typescript": "2.3.3"
    },
    "cordovaPlugins": [
        "cordova-plugin-whitelist",
        "cordova-plugin-console",
        "cordova-plugin-statusbar",
        "cordova-plugin-device",
        "cordova-plugin-splashscreen",
        "ionic-plugin-keyboard"
    ],
    "cordovaPlatforms": [],
    "description": "clubzoom: An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-background-mode": {},
            "cordova-sqlite-storage": {},
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "cordova.plugins.diagnostic": {},
            "ionic-plugin-keyboard": {},
            "phonegap-plugin-push": {
                "SENDER_ID": "XXXXXXXXXX"
            }
        }
    }
}

#2

Does ionic cordova build android work?
What is the output of ionic info?


#3

Olá, estava dando um erro completamente diferente.

[WARN] Error occurred during command execution from a CLI plugin
        (@ionic/cli-plugin-cordova). Your plugins may be out of date.
 Error: Encountered undefined provider! Usually this means you have a circular de
 pendencies (might be caused by using 'barrel' index.ts files.

foi só eu remover o Storage do arquivo app.modules.ts que resolveu meu problema.