No name was provided for external module : <p>I created a data library, then tried to include the data library into another created library. Built fine, but received - "No name was provided for external module 'my-data' in output.globals – guessing 'myData'". What am I missing?</p>

<p>Complete steps to re-create.</p>

<ul>
<li>ng new test-project --create=application=false</li>
<li>cd test-project</li>
<li>npm audit fix</li>
<li>ng g library my-data</li>
<li>ng g library my-core</li>
<li>ng g application address-book</li>
<li>ng build my-data</li>
<li>Then in my-core.module add import { MyDataModule } from 'my-data';</li>
<li>Then in my-core.module add imports: [MyDataModule]</li>
<li>ng build my-core</li>
</ul>

<p>my-core.module.ts</p>

<pre><code>import { NgModule } from '@angular/core';
import { MyCoreComponent } from './my-core.component';
import { MyDataModule } from 'my-data';

@NgModule({
  declarations: [MyCoreComponent],
  imports: [MyDataModule],
  exports: [MyCoreComponent]
})
export class MyCoreModule { }
</code></pre>

<ul>
<li>After build get "No name was provided for external module 'my-data' in output.globals – guessing 'myData'"</li>
</ul>
