CirclonGroup/angular-tree-component

Angular 16 support

Closed this issue ยท 23 comments

I updated to Angular v16 and now I can't build the application

node_modules/@circlon/angular-tree-component/lib/angular-tree-component.module.d.ts:22:22
22 export declare class TreeModule {
~~~~~~~~~~
This likely means that the library (@circlon/angular-tree-component) which declares TreeModule 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.

Found this Fork (Seems that @slavede upgraded to Angular16 already):

Changes In Fork

https://github.com/slavede/angular-tree-component-amphinicy

Checking if it is working and will update..

Found this Fork (Seems that @slavede upgraded to Angular16 already):

Changes In Fork

https://github.com/slavede/angular-tree-component-amphinicy

Checking if it is working and will update..

Yeah, it's still work in progress. Still need to test build and publish. I plan to do that once Im back to work next week. If you are able to test build and publish feel free.
Its kind of working as an example app. Not sure completely in demo to fully test as it lacks documentation, but basic example seems to be working

Thank you very much!,
We will wait for your publish.

I saw this post, #951, and am assuming to get this to v16, it's do it yourself as there don't appear to be any alternatives. If someone has already done it, please let me know so I can stop working on this:).

I am working on an ng upgrade project that uses the tree component. I was able to get my project to ng v15 with the existing component but was blocked on moving to v16.

Update: I have made changes to build, pass all tests and publish to NPM as well and run in a new ng v16 solution.

I have limited time, knowledge etc, but if you need to get it working, it is an option now.

https://github.com/odymaui/angular-tree-component/tree/angular-upgrades-11-to-16

ali-hm commented

Hi,
please give this fork a try:
https://github.com/ali-hm/angular-tree-component

Unfortunately it looks like you are only at version 14. Have you tried upgrading all the way to version 16?

ali-hm commented

There is no need to upgrade it to 16 right now, It is compiled using Ivy and the error "TreeModule is not compatible with Angular Ivy" has been resolved. You can use it in Angular 14+.

I can confirm that @ali-hm fork is working fine. Since I have a lot of my daytime job to do, I will not continue pursuit of getting my fork to Angular 16, for the time being, I can live with @ali-hm 's solution (thanks @ali-hm btw!).

@slavede Hi, man! Did you publish this library on NPM, already?

@slavede Hi, man! Did you publish this library on NPM, already?

Hey, check the comment above. ali-hm's project solves Ivy issue so I did not continue with updating my fork to 16

@avoronkoff - If you need a fork/package that requires ngcc, use one of the forks mentioned above.

If you require a fork/package that does not require/depend on ngcc, you can try this https://www.npmjs.com/package/@odymaui/angular-tree-component.

Support is limited but it is an option if you need to move to Ivy only.

I can too confirm, your fork @ali-hm is working just fine on Angular 16. Thank you very much, this will do it for now.

Do you plan to further maintain your fork? It's indeed a powerfull Tree-Component. All that bootstrap stuff is buggy even on their docs samples. If u dont plan to maintain the fork, which I can totally understand, I think its time to move on from this beauty ๐Ÿ˜ข

ali-hm commented

I can too confirm, your fork @ali-hm is working just fine on Angular 16. Thank you very much, this will do it for now.

Do you plan to further maintain your fork? It's indeed a powerfull Tree-Component. All that bootstrap stuff is buggy even on their docs samples. If u dont plan to maintain the fork, which I can totally understand, I think its time to move on from this beauty ๐Ÿ˜ข

I am currently using this component in my projects and I have plan to fix the issues regarding compatibility with newer versions of Angular and other dependencies. So feel free to report any issues and I will try to fix them.

I am currently using this component in my projects and I have plan to fix the issues regarding compatibility with newer versions of Angular and other dependencies. So feel free to report any issues and I will try to fix them.

Thats really nice too hear. Much appreciated, thank you!

@ali-hm solution is not working correctly with Angular 16. When I attempt to use it, I encounter a dependency conflict error with Angular Core versions. Specifically, the package seems to be designed for Angular 14+, but it's not compatible with Angular 16 due to changes in core dependencies.

Here is an extract of the version conflict:

Found: @angular/core@16.2.6
@angular/core@"^16.2.6" from the root project
peer @angular/core@">=14.0.0" from @ali-hm/angular-tree-component@12.0.5
@ali-hm/angular-tree-component@"^12.0.5" from the root project
Could not resolve dependency

@usmananwar-1995 currently I am using this component (my version:12.0.5) in Angular 16.2.8 and it has no issue (building like a charm). please make sure the issue is not related to other aspects of your project.

@ali-hm I've updated my project to Angular 16.2.8 as well, and now the component (@ali-hm/angular-tree-component@12.0.5) works flawlessly with this version.

+1
Facing the issue with Angular 16 IVY.
@ali-hm 's fork worked fine.

issue not fixed yet. getting same error in angular 16.2.0

I have to create fork for angula 16:

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

You can use my fork "@ali-hm/angular-tree-component".
It is working in Angular 14+ (Angular 14,15,16,17) without any issues. My own project (using that fork) is on Angular 17.0.8 and it works flawlessly.

Closing an issue. Seems guys already handle this case