0

我正在使用 Angular 11.0.4 版。我正在尝试使用npm包实现无限滚动。我从文档https://www.npmjs.com/package/ngx-virtual-scroller中完成了每一步

我收到以下错误:

Error: node_modules/ngx-infinite-scroll/src/modules/ngx-infinite-scroll.module.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of EventCreationModule, but could not be resolved to an NgModule class.
   
This likely means that the library (ngx-infinite-scroll), which declares InfiniteScrollModule 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.
    
    1 export declare class InfiniteScrollModule {
                           ~~~~~~~~~~~~~~~~~~~~
    node_modules/ngx-infinite-scroll/src/modules/ngx-infinite-scroll.module.d.ts:1:22 - error NG6003: Appears in the NgModule.exports of EventCreationModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class.
   
This likely means that the library (ngx-infinite-scroll) which declares InfiniteScrollModule 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.

如果有人知道如何解决这个问题,我将不胜感激。提前致谢。

4

1 回答 1

2

您所要做的就是停止程序一次并再次运行它。

于 2021-05-07T00:44:48.527 回答