title: TypeError: Cannot read property 'isSkipSelf' of null Angular 6
body: <p>I've created a library with Angular 6 and built it succesfully.
  Once I add a module(<strong>AdjudicationHistoriqueModule</strong>) to my library module, I get the following error when i build the library:</p>
  
  <pre><code>TypeError: Cannot read property 'isSkipSelf' of null
      at ProviderElementContext._getDependency (C:\Users\taha.manar\Documents\workspace\ADJUDICATION-IHM\node_modules\@angular\compiler\bundles\compiler.umd.js:11483:22)
      at C:\Users\taha.manar\Documents\workspace\ADJUDICATION-IHM\node_modules\@angular\compiler\bundles\compiler.umd.js:11428:64
      at Array.map (&lt;anonymous&gt;)
      at C:\Users\taha.manar\Documents\workspace\ADJUDICATION-IHM\node_modules\@angular\compiler\bundles\compiler.umd.js:11428:30
  ...
  </code></pre>
  
  <p>I also get the same error when adding the line below to the pulic_api.ts file</p>
  
  <pre><code>export * from './lib/historique/adjudication-historique.module';
  </code></pre>
  
  <p>adjudication-historique.module.ts</p>
  
  <pre><code>import { AlmCommonModule } from './../Common/alm-common.module';
  import { AlmRootPageModule } from './../Common/root-page/root-page.module';
  import { NgModule } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { AdjudicationHistoriqueRoutingModule } from './adjudication-historique-routing.module';
  import { HistoriqueComponent } from './historique.component';
  import { AdjudicationStructHistoriqueComponent } from './adjudication-struct-historique.component';
  import { HistoriqueService } from './historique.service';
  
  @NgModule({
    imports: [
  CommonModule,AdjudicationHistoriqueRoutingModule,AlmRootPageModule,AlmCommonModule
    ],
    declarations: [HistoriqueComponent,AdjudicationStructHistoriqueComponent]
  ,
  providers : [HistoriqueService]
  
  })
  export class AdjudicationHistoriqueModule { }
  </code></pre>
  
  <p>adjudication.module.ts (Library module)</p>
  
  <pre><code>import { HistoriqueService } from './historique/historique.service';
  import { NgModule } from '@angular/core';
  import { AdjudicationComponent } from './adjudication.component';
  
  @NgModule({
    imports: [
    ],
    declarations: [AdjudicationComponent],
    exports: [AdjudicationComponent],
    providers: [HistoriqueService]
  })
  export class AdjudicationModule { }
  </code></pre>
  
  <p>P.S : I'm upgrading my project from Angular 4 to Angular 6</p>