角度库编译:错误:无法读取未定义的属性"then"



我有一个带几个项目(库(的angular 11工作区。最近,我在一个库中添加了一个新组件,编译一切都很好。在我的public-api.ts文件中公开了这个新组件后,我在编译我的库时(使用ng build my lib命令(收到了一行无意义的错误:

错误:无法读取未定义的属性'then'

有人遇到这个问题吗?请帮忙!

public-api.ts最新变化:

export * from './lib/ray-autocomplete/ray-autocomplete.module';
export * from './lib/ray-autocomplete/ray-autocomplete.component';

这是我从另一个组件复制新组件时的错误;我忘了在@Component声明处重命名文件:

@Component({
selector: 'ray-autocomplete',
templateUrl: './ray-autocomplete.component.html', 
styleUrls: ['./ray-autocomplete.component.css'], 

但这个错误是非常误导人的。

最新更新