css-animator not working with ng9
jratiwanich opened this issue · comments
When compile/build with Angular 9.1 (latest), the build is failing after adding AnimationService, AnimatorModule
into my module. I get an error like below:
This likely means that the library (css-animator) which declares AnimatorModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy.
Thanks for reporting @jratiwanich I will try to have a look asap. If you in the meantime found out what the issue could be, please let me know :)
@jratiwanich are you able to find the issue, i am also facing the same issue
if you are able to solve it please let me know also or you are taking some other approach
Same here.
@fabiandev, @jratiwanich or @anuj141samariya anyone found the solution?
Is this the same issue as #34?
Can you please provide a minimal example repo to easily reproduce?
It was very simple. Just setup a new angular 9+ project and include the AnimatorModule
. Here's an example: https://stackblitz.com/edit/angular-ivy-rxjmym
While debugging the Angular code and found the reason. The reason is that the generated file of css-animator
doesn't export a static ɵmod
property in the module class.
This is the line of code: https://github.com/angular/angular/blob/9.1.x/packages/compiler-cli/src/ngtsc/metadata/src/dts.ts#L36
Not sure exactly how to fix it, but I'll try to upgrade your dependencies to Angular 9, and try to run the build script again
It didn't work :( I don't know what else can I do, so I'll be dropping the usage of css-animator
in my project.
I can have a look when I find some time, thanks @Daymannovaes 🙌
I've finally adjusted the setup and put out 2.4.0-beta.4
which should work with Ivy. You can install by the exact version or via the next
tag:
$ npm install css-animator@next --save
$ yarn add css-animator@next
Somehow StackBlitz messes up dependency loading for me, but on CodeSandbox you can see that it compiles fine with the beta: https://codesandbox.io/s/lively-dream-xh2vi?file=/package.json (updated to Angular 12)
Can you confirm this is working for you @Daymannovaes? I'll then push out a stable 2.4.0
release. Thanks for bearing with me 😅
Fixed via v2.4.0
, please re-open if you are still experiencing issues 🙌