Main module fail when prod build

I want build my app in prod and I have an error :

Unexpected value 'null' imported by the module 'AppModule in /src/app/app.module.ts'

I did some research and I think the error comes from the fact that I import a mode that itself the export default statement ....

The problem is that it’s probably a native module and I can not change it. Is it possible to disable or ignore this error so that I can finish my build?

My module :

export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}

@NgModule({
declarations: [
MyApp,
HomePage,
LoginPage,
RegisterPage,
StationsPage,
LogoutPage,
MapsPage,
ItineraryPage,
RecordingPage,
DatePipeProxy
],
imports: [
BrowserModule,
BrowserAnimationsModule,
IonicStepperModule,
TranslateModule.forRoot({
    loader: {
        provide: TranslateLoader,
        useFactory: (createTranslateLoader),
        deps: [HttpClient]
    }
}),
IonicModule.forRoot(MyApp, {
    backButtonText: '',
    iconMode: 'ios',
    modalEnter: 'modal-slide-in',
    modalLeave: 'modal-slide-out',
    tabbarPlacement: 'bottom',
    pageTransition: 'ios',
}),
ReactiveFormsModule,
HttpClientModule
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
LoginPage,
RegisterPage,
StationsPage,
LogoutPage,
MapsPage,
ItineraryPage,
RecordingPage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
AuthProvider,
StationProvider,
MeteoProvider,
{ provide: LOCALE_ID, useValue: 'fr-FR' },
NetworkProvider,
Facebook,
MapsProvider,
Astar,
Geolocation,
File,
ConnexionProvider,
Network,
CacheFile,
LanguageProvider,
{ provide: LOCALE_ID, useValue: window.navigator.language },
BatchProvider
]
})
export class AppModule {}

Source: Angular

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.