Encountered undefined provider on build

Hi,

I have an error on my application when I run ionic cordova build android --prod --release --verbose :slight_smile:

[14:08:11]  build prod started ...
[14:08:11]  clean started ...
[14:08:11]  clean finished in 1 ms
[14:08:11]  copy started ...
[14:08:11]  deeplinks started ...
[14:08:11]  deeplinks finished in 54 ms
[14:08:11]  ngc started ...
[14:08:14]  typescript error
            Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by
            using 'barrel' index.ts files. debug = provider for the NgModule 'AppModule in
            C:/Users/clami/Documents/IONIC/APPLIS/Docks/docksfidelite/src/app/app.module.ts'

Error: The Angular AoT build failed. See the issues above
    at C:\Users\clami\Documents\IONIC\APPLIS\Docks\docksfidelite\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:237:55
    at step (C:\Users\clami\Documents\IONIC\APPLIS\Docks\docksfidelite\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)
    at Object.next (C:\Users\clami\Documents\IONIC\APPLIS\Docks\docksfidelite\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:13:53)
    at fulfilled (C:\Users\clami\Documents\IONIC\APPLIS\Docks\docksfidelite\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:4:58)
[DEBUG] Error: The Angular AoT build failed. See the issues above
             at C:\Users\clami\Documents\IONIC\APPLIS\Docks\docksfidelite\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:237:55
             at step (C:\Users\clami\Documents\IONIC\APPLIS\Docks\docksfidelite\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)
             at Object.next (C:\Users\clami\Documents\IONIC\APPLIS\Docks\docksfidelite\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:13:53)
             at fulfilled (C:\Users\clami\Documents\IONIC\APPLIS\Docks\docksfidelite\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:4:58)

And my app.module.ts :

import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { HttpModule } from '@angular/http';

import { BoutiquesPage } from '../pages/boutiques/boutiques';
import { HomePage } from '../pages/home/home';
import { OffresPage } from '../pages/offres/offres';
import { BoutiquedetailPage } from '../pages/boutiquedetail/boutiquedetail'
import { QrcodePage } from '../pages/qrcode/qrcode';
import { LoginPage } from '../pages/login/login';
import { HomeconnexionPage } from '../pages/homeconnexion/homeconnexion';
import { InscriptionPage } from '../pages/inscription/inscription';
import { ForgotPage } from '../pages/forgot/forgot';
import { UserPage } from '../pages/user/user';
import { UserinfosPage } from '../pages/userinfos/userinfos';
import { UserpasswordPage } from '../pages/userpassword/userpassword';
import { MentionsPage } from '../pages/mentions/mentions';

import { StatusBar } from '@ionic-native/status-bar';
import { BarcodeScanner } from '@ionic-native/barcode-scanner';
import { SplashScreen } from '@ionic-native/splash-screen';
import { DataserviceProvider } from '../providers/dataservice/dataservice';
import { EmailComposer } from '@ionic-native/email-composer';
import { IonicStorageModule } from '@ionic/storage';
import { CallNumber } from '@ionic-native/call-number';
import { InAppBrowser } from '@ionic-native/in-app-browser';

import { BoutiqueCardComponent } from '../components/boutique-card/boutique-card';

@NgModule({
  declarations: [
    MyApp,
    BoutiquesPage,
    HomePage,
    OffresPage,
    BoutiquedetailPage,
    QrcodePage,
    LoginPage,
    HomeconnexionPage,
    InscriptionPage,
    ForgotPage,
    UserPage,
    UserinfosPage,
    UserpasswordPage,
    MentionsPage,
    BoutiqueCardComponent
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    IonicStorageModule.forRoot(),
    HttpModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    BoutiquesPage,
    HomePage,
    OffresPage,
    BoutiquedetailPage,
    QrcodePage,
    LoginPage,
    HomeconnexionPage,
    InscriptionPage,
    ForgotPage,
    UserPage,
    UserinfosPage,
    UserpasswordPage,
    MentionsPage,
    BoutiqueCardComponent
  ],
  providers: [
    StatusBar,
    SplashScreen,
    BarcodeScanner,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    DataserviceProvider,
    EmailComposer,
    CallNumber,
    InAppBrowser,
    Storage
  ]
})
export class AppModule {}

And here is the only provider I developed for the application: DataserviceProvider

import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';

/*
  Generated class for the DataserviceProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class DataserviceProvider {

  private baseUrl = "https://www.lesdocks-marseille.com/";

  constructor(private http: Http) {
   
  }

  retrieveData(){
    return this.http.get(this.baseUrl+"API/boutiques")
   }

   retrieveDataRestaurants(){
    return this.http.get(this.baseUrl+"API/restaurants")
   }

   retrieveDataPartenaires(){
    return this.http.get(this.baseUrl+"API/partenaires")
   }
   
   retrieveDataById(id_){
     return this.http.get(this.baseUrl+"API/boutiques/"+id_)
   }

   retrieveDataPartenaireById(id_){
    return this.http.get(this.baseUrl+"API/partenaires/"+id_)
  }
   
   retrieveDataPromosById(id_)
   {
      return this.http.get(this.baseUrl+"API/promotions/"+id_)
   }

   retrieveBoutiquesPromos(){
    return this.http.get(this.baseUrl+"API/offres/1")
   }

   retrieveRestosPromos(){
    return this.http.get(this.baseUrl+"API/offres/2")
   }

   retrievePartenairesPromos(){
    return this.http.get(this.baseUrl+"API/offres/3")
   }

}

When I execute ionic cordova run android, everything goes well, it is only at the time of the build that I have this error

I searched many forums for solutions to this problem but none worked.

Could you help me?

Thank you !