leovo2708 / ngx-treeview

An Angular treeview component with checkbox
MIT License
363 stars 337 forks source link

error NG6002: 'TreeviewModule' does not appear to be an NgModule class. #347

Closed itsmehrd closed 9 months ago

itsmehrd commented 11 months ago

I am upgarding my app to Angular v16 and I am unable to use 'ngx-treeview' library.

Error: src/app/app.module.ts:105:12 - error NG6002: 'TreeviewModule' does not appear to be an NgModule class.

105   imports: [
               ~
106     BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }),
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
156     NgbModule,
    ~~~~~~~~~~~~~~
157   ],
    ~~~

  node_modules/ngx-treeview/lib/treeview.module.d.ts:2:22
    2 export declare class TreeviewModule {
                           ~~~~~~~~~~~~~~
    This likely means that the library (ngx-treeview) which declares TreeviewModule is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checkin
g with the library's authors to see if the library is expected to be compatible with Ivy.

image

Any fix for this issue?

mazouakh commented 10 months ago

I'm having the same issue. Did you manage to find a work around?

itsmehrd commented 9 months ago

"ngx-treeview-custom": "^10.5.4", I am using another package forked from the ngx-treeview. This solved my issue. https://www.npmjs.com/package/ngx-treeview-custom