'TreeModule' does not appear to be an NgModule class

594 Views Asked by At

I just literally follow the step by step here in this documentation but for some reason im having this error when i try to import angular-tree-component in app.module.ts eror

i just follow the documentation written here https://angular2-tree.readme.io/docs/getting-started#slack-community.

2

There are 2 best solutions below

0
On BEST ANSWER

Angular v16 has dropped the support for non-ivy libraries.

This library choose to not enable ivy by default.

So you won't be able to use it in a v16 project !

0
On

The original library does not enable ivy by default and no one knows whether they change it in the near future.

You can use @bugsplat/angular-tree-component which is a fork of angular-tree-component which was original an upgrade to Angular 13, but it seems to work fine with 16 as well.

https://www.npmjs.com/package/@bugsplat/angular-tree-component

The other option is this one: https://www.npmjs.com/package/@ali-hm/angular-tree-component