admin管理员组文章数量:1295302
I'm using Angular x-image-viewer to view images. After updating from Angular 16 to Angular 19, I encountered this error. I'm not sure if it's related to Angular 19, as I got the same error in Angular 17.
Full error message:
Error: src/app/app.module.ts:149:5 - error NG6002: 'AngularImageViewerModule' does not appear to be an NgModule class.
149 AngularImageViewerModule
~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/angular-x-image-viewer/lib/angular-image-viewer.module.d.ts:1:22
1 export declare class AngularImageViewerModule {
~~~~~~~~~~~~~~~~~~~~~~~~
This likely means that the library (angular-x-image-viewer) which declares AngularImageViewerModule 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 tried to find a replacement for this library, but I couldn't find anything that works with Angular 19. I also tried adding
"postinstall": "ngcc",
to package.json but it didn’t resolve the issue.
版权声明:本文标题:angular - error NG6002: 'AngularImageViewerModule' does not appear to be an NgModule class - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741615766a2388517.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论