小编Ty *_*ers的帖子

没有提供外部模块的名称

我创建了一个数据库,然后尝试将该数据库包含到另一个创建的库中。构建良好,但收到-“未在output.globals中为外部模块'my-data'提供名称-猜测'myData'”。我想念什么?

完成重新创建的步骤。

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

my-core.module.ts

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 { }
Run Code Online (Sandbox Code Playgroud)
  • After build get …

angular angular7

5
推荐指数
1
解决办法
2058
查看次数

标签 统计

angular ×1

angular7 ×1