title: Can't link my library Angular in another library Angular
body: <h1>Context</h1>
  <p>I created several independent angular libraries in different folders:</p>
  <ul>
  <li>/home/user/lib1</li>
  <li>/home/user/lib2</li>
  <li>/home/user/lib3</li>
  </ul>
  <p>The lib2 and lib3 libraries have a dependency on the lib1 library.</p>
  <pre><code>// Example of the lib3.module.ts 
  import {Lib1Module} from '@libs/lib1';
  
  @NgModule({
    declarations: [Lib3Component],
    imports: [
      Lib1Module
    ],
    exports: [Lib3Component]
  })
  export class Lib3Module { }
  </code></pre>
  <p>However, when I create a symlink of lib1 and import it into lib2 and lib3 with the command &quot;npm link lib1&quot;, I get a build issue (bellow, you can see the error message).</p>
  <pre><code>ERROR: : Unexpected value 'Lib1Module in /home/user/Documents/multiple-angular-lib/lib1/dist/libs/lib1/libs-lib1.d.ts' imported by the module 'Lib2Module in /home/user/Documents/multiple-angular-lib/lib2/projects/libs/lib2/src/lib/lib2.module.ts'. Please add a @NgModule annotation.
  </code></pre>
  <p>The most amazing thing in all this, is, if I deploy my component on the official repository of npm, it will work. It's the same structure and files! So there is a problem with the symlink.</p>
  <h1>What I tried</h1>
  <p>I tried to follow the solutions proposed here:</p>
  <ul>
  <li><a href="https://github.com/angular/angular-cli/issues/10665" rel="nofollow noreferrer">https://github.com/angular/angular-cli/issues/10665</a></li>
  </ul>
  <h1>How to reproduce my problem</h1>
  <p>I've reproduced an example here: <a href="https://github.com/fjoalland/multiple-angular-lib/tree/master" rel="nofollow noreferrer">https://github.com/fjoalland/multiple-angular-lib/tree/master</a></p>
  <p>Just follow the steps and you should have the same error as me.</p>
  <h1>Error message</h1>
  <p>Bellow, the full error I got when I try to build the lib2 with a symlink of the lib1</p>
  <pre><code>[root@user lib2]# ng build
  Building Angular Package
  
  ------------------------------------------------------------------------------
  Building entry point '@libs/lib2'
  ------------------------------------------------------------------------------
  Compiling TypeScript sources through ngc
  ERROR: : Unexpected value 'Lib1Module in /home/user/Documents/multiple-angular-lib/lib1/dist/libs/lib1/libs-lib1.d.ts' imported by the module 'Lib2Module in /home/user/Documents/multiple-angular-lib/lib2/projects/libs/lib2/src/lib/lib2.module.ts'. Please add a @NgModule annotation.
  
  An unhandled exception occurred: : Unexpected value 'Lib1Module in /home/user/Documents/multiple-angular-lib/lib1/dist/libs/lib1/libs-lib1.d.ts' imported by the module 'Lib2Module in /home/user/Documents/multiple-angular-lib/lib2/projects/libs/lib2/src/lib/lib2.module.ts'. Please add a @NgModule annotation.
  
  See &quot;/tmp/ng-V1D4qF/angular-errors.log&quot; for further details.
  </code></pre>
  <p>The contents of the angular-error.log file:</p>
  <pre><code>[error] Error: : Unexpected value 'Lib1Module in D:/Documents/multiple-angular-lib/lib1/dist/libs/lib1/libs-lib1.d.ts' imported by the module 'Lib2Module in D:/Documents/multiple-angular-lib/lib2/projects/libs/lib2/src/lib/lib2.module.ts'. Please add a @NgModule annotation.
  
      at Object.&lt;anonymous&gt; (D:\Documents\multiple-angular-lib\lib2\node_modules\ng-packagr\lib\ngc\compile-source-files.js:73:19)
      at Generator.next (&lt;anonymous&gt;)
      at fulfilled (D:\Documents\multiple-angular-lib\lib2\node_modules\ng-packagr\lib\ngc\compile-source-files.js:4:58)
  </code></pre>