Ngx-toastr: AOT build failing

Created on 14 Sep 2017  路  7Comments  路  Source: scttcper/ngx-toastr

I have created an issue on the angular repository, I am not sure whether this is a problem with angular or this package. Please see details here: https://github.com/angular/angular/issues/19200

Most helpful comment

Yeah I think it may have been the way they initially did animations. I think when they split to @angular/animations the code stayed pointed to @angular/core. Guess they left it in both places for backwards compatibility until the next major version.

@MrBlaise version 6.2.0 was released. If everything looks good on your end we'll close out both issues.

All 7 comments

I've tested my app (which uses a lot of third party packages) without ngx-toastr and it ran fine. Seems like it is special problem related to something in this package. The ng2-toastr package does the same Recursion error. Still no idea what causes it :S

It's an issue with animations being used by the Toastr component. If you comment out the whole animations section in the Toastr component (and any component that uses animations), everything compiles. Did the use of animations change with angular 5.0.0-beta.7?

The compiler has issues with animations being used in @angular/core. This includes trigger, animate, style, and probably transition

I meant to create a PR but accidentally pushed to master. Thought I was in my forked repository. I also meant to branch...

But anyways, I just pushed a fix for this. The issue was that we were importing trigger, state, animate, style, and keyframes from @angular/core instead of @angular/animations

@scttcper Do you want to make sure that everything still works the way you think it should?

.... how does typescript not pick up the import missing or.. what is even happening...

It does look like @angular/animations is the way to go and is the way i'm doing it in other places. I think @angular/core was how they told us to do it when animations first were added.

Published 6.2.0. Builds fine w/ angular 5

Yeah I think it may have been the way they initially did animations. I think when they split to @angular/animations the code stayed pointed to @angular/core. Guess they left it in both places for backwards compatibility until the next major version.

@MrBlaise version 6.2.0 was released. If everything looks good on your end we'll close out both issues.

Thanks! It seems to work fine now :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jschneiders picture jschneiders  路  7Comments

quirogamauricio picture quirogamauricio  路  3Comments

wa1gon picture wa1gon  路  6Comments

sollygit picture sollygit  路  7Comments

picninim picture picninim  路  6Comments