Ani*_*Das 55 angular angular-library angular9
我将所有 angular 库升级为angular 9.0.0using ng update,当我尝试构建它们时,出现以下错误。
错误:
不受支持的私有类 SomeComponent。此类通过 SomeModule -> SomeComponent 对消费者可见,但不会从顶级库入口点导出。
有人解决了这个错误吗?
Ani*_*Das 119
如果任何组件被导出NgModule但未包含在您的 中public_api.ts,Angular 9则会发生此错误,现在将引发错误。
这个错误没有出现,Angular 8但升级到Angular 9它后开始显示。
如果您导出了任何service、module或component等,请NgModule确保将它们包含在其中,public_api.ts否则angular 9现在会抛出错误。
修复:将您的组件添加到 public_api.ts
export * from './lib/components/some-me/some-me.component';
Run Code Online (Sandbox Code Playgroud)
小智 12
今天我也遇到了同样的问题。
我的先决条件:
使固定:
export * from './just/a/relative/path/to/the/directive/{{myDirectiveFile}}';
| 归档时间: |
|
| 查看次数: |
18471 次 |
| 最近记录: |