与与Ivy兼容的Angular2-dataTable有关的错误
我在我的角度应用程序中使用 angular2-datatable 版本 0.6.0 角度版本 2。 我们最近将 Angular 升级到使用 13.2.0,应用程序构建并编译成功。 但是当我执行 ng 服务时,我看到一些控制台错误。 这些错误与 angular2-datatable 相关,表示它与 Ivy 不兼容。 错误如下所示。
错误:node_modules/angular2-datatable/lib/DataTableModule.d.ts:1:22 - 错误 NG6002:出现在 XXXXXXX 的 NgModule.imports 中,但无法解析为 NgModule 类。
这可能意味着声明 DataTableModule 的库 (angular2-datatable) 尚未被 ngcc 正确处理,或者与 Angular Ivy 不兼容。检查该库是否有新版本可用,如果有则更新。还可以考虑与库的作者联系,看看该库是否与 Ivy 兼容。
我看到最新版本的 angular2-datatable 是 0.6.0。 我尝试在 Angular.json 文件中更改 "aot": true 或 false,并将 tsconfig.json 中的 "enableIvy" 属性修改为 true 或 false,似乎没有什么可以清除这些错误。
关于如何解决这个问题的任何线索..
I am using angular2-datatable version 0.6.0 in my angular application which used
Angular Version 2.
We upgraded Angular to use 13.2.0 recently, the application build and compiles successfully.
But I see some console error when I did ng serve.
The errors are related to angular2-datatable saying that is is not compatible with Ivy.
The error is shown below.
Error: node_modules/angular2-datatable/lib/DataTableModule.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of XXXXXXX, but could not be resolved to an NgModule class.
This likely means that the library (angular2-datatable) which declares DataTableModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
I see the latest version of angular2-datatable is 0.6.0.
I tried changing "aot": true or false in Angular.json file and also modified "enableIvy" property in tsconfig.json to true or false, nothing seems to clear those errors.
Any clue on how to resolve this..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在
中,angular.json
设置buildOptimizer
和aot
属性 properties tofalse
为我完成了工作。In
angular.json
setting bothbuildOptimizer
andaot
properties tofalse
did the job for me.