Error when carrying a paginal to production (Angular 2)

0

I have a web page created with Angular 2. And when doing 'ng build --prod' to create the 'Dist' folder, I get the following error (Image attached). Where could this error be coming from? The code is too long to show it, but to have an idea that it might be causing it.

The problem I think is with AOT, since doing 'ng build --prod --aot false' worked fine.

  

@NgModule ({     imports: [       BrowserModule,       FormsModule,       ReactiveFormsModule,       AdminModule,       LandUseModule,       InventoryModule,       InvestmentModule,       TicketModule,       EconomicModule,       FarmingModule,       CattleModule,       PlanningModule,       CloseModule,       InitializationModule,       LaboursModule,       UserPersonalInfoModule,       IndicatorsModule,       HttpModule,       FlexLayoutModule,       // BrowserAnimationsModule,       MaterialModule.forRoot (),       RouterModule.forRoot (routes),       LoginModule,       ErrorModule,       AgmCoreModule.forRoot ({         apiKey: 'AIzaSyBQrvX51XCQGSbrJdq0Fmp04fTRMBzTnmQ'       }),       TranslateModule.forRoot ({         provide: TranslateLoader,         useFactory: translateFactory,         deps: [Http]       }),       Angulartics2Module.forRoot ([Angulartics2GoogleAnalytics]),       MdIconModule     ],     declarations: [       AppComponent,       MenuItemComponent,       LayoutComponent     ],     bootstrap: [AppComponent],     providers: [       CookieService,       LoggedInGuard,       PermissionsGuard,       DialogsDataService,       {provide: Http, useClass: ExtendedHttpService},       {provide: RequestOptions, useClass: CustomRequestOptions},       MdIconRegistry,       LayoutService     ],     exports: [BrowserModule, HttpModule, TranslateModule]   })

    
asked by Sebastian Garcia Fischer 21.05.2018 в 22:11
source

0 answers