title: Angular - cannot find module
body: <p>I created app using JHipster (simple Java + Angular app). When I compile project to prod profile, I get
  <a href="https://i.stack.imgur.com/kgNEJ.png" rel="nofollow noreferrer">Error</a>.
  Admin Module is added using AppRoutingModule, code below:</p>
  
  <pre><code>@NgModule({
    imports: [
      RouterModule.forRoot(
        [
          {
            path: 'admin',
            loadChildren: './admin/admin.module#DepozytKlAdminModule'
          },
          ...LAYOUT_ROUTES
        ],
        { enableTracing: false }
      )
    ],
    exports: [RouterModule]
  })
  export class DepozytKlAppRoutingModule {}
  </code></pre>
  
  <p>And also app.module:</p>
  
  <pre><code>@NgModule({
    imports: [
      BrowserModule,
      BrowserAnimationsModule,
      NgxWebstorageModule.forRoot({ prefix: 'dkl', separator: '-' }),
      NgJhipsterModule.forRoot({
        // set below to true to make alerts look like toast
        alertAsToast: false,
        alertTimeout: 5000,
        i18nEnabled: true,
        defaultI18nLang: 'pl'
      }),
      DepozytKlSharedModule.forRoot(),
      DepozytKlCoreModule,
      DepozytKlHomeModule,
      DepozytKlAccountModule,
      DepozytKlEntityModule,
      DepozytKlAppRoutingModule,
      // jhipster-needle-angular-add-module JHipster will add new module here
    ],
    declarations: [ ... ],
    providers: [ ... ],
    bootstrap: [DklMainComponent]
  })
  export class DepozytKlAppModule {
    constructor(private dpConfig: NgbDatepickerConfig) {
      this.dpConfig.minDate = { year: moment().year() - 100, month: 1, day: 1 };
    }
  }
  </code></pre>
  
  <p>Interesting fact is that PROD profile works (entities section), I have problems with admin module. 
  admin.module.ts:</p>
  
  <pre><code>@NgModule({
    imports: [
      DepozytKlSharedModule,
      /* jhipster-needle-add-admin-module - JHipster will add admin modules here */
      RouterModule.forChild(adminState),
      DepozytKlOrganisationModule
    ],
    declarations: [
      AuditsComponent,
      UserMgmtComponent,
      UserMgmtDetailComponent,
      UserMgmtUpdateComponent,
      UserMgmtDeleteDialogComponent,
      LogsComponent,
      DklConfigurationComponent,
      DklHealthCheckComponent,
      DklHealthModalComponent,
      DklDocsComponent,
      DklMetricsMonitoringComponent,
      UserMgmtUpdateExtendedComponent
    ],
    providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }],
    entryComponents: [
      UserMgmtDeleteDialogComponent,
      DklHealthModalComponent,
      UserMgmtUpdateExtendedComponent,
      OrganisationTreeSelectionComponent,
      OrganisationTreeComponent
    ],
    schemas: [CUSTOM_ELEMENTS_SCHEMA]
  })
  export class DepozytKlAdminModule {
    constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) {
      this.languageHelper.language.subscribe((languageKey: string) =&gt; {
        if (languageKey !== undefined) {
          this.languageService.changeLanguage(languageKey);
        }
      });
    }
  }
  </code></pre>
  
  <p>Any suggestions ? </p>