Open tsvetomir opened 4 years ago
@tsvetomir thanks for letting us know about this- having folks on our side investigate now 👍
This is happening for one of my own Angular libraries -- is there any way we can get more info than just "ngcc failed to run"? The same library seems to work fine in a local Angular CLI app...
Some digging in the Chrome Inspector leads me to this request (this library isn't mine but it also fails to load in StackBlitz): GET https://l.staticblitz.com/ngcc/v3/9.1.9/ngx-monaco-editor@9.0.0 -> 500 with body "Internal Server Error"
Yeah, the issue is that ngcc fails out on our serverless endpoint, but this can happen for a variety of reasons (package too big, peerDependencies missing, etc). @rezonant can you link your package here as well so I can test it out?
Absolutely, my Angular component library is diazo
on NPM, and here is a Stackblitz with Diazo, ngx-monaco-editor and the other peer deps loaded in that causes the issue:
https://stackblitz.com/edit/angular-ivy-vvwp1d
EDIT: While waiting to hear back it occurs to me the "package too big" is a pretty compelling reason- diazo
is currently 3.11MB on NPM, ngx-monaco-editor
is some 10MB and @progress/kendo-angular-grid
(which fails in the OP) is 7.22MB. The other Kendo UI dependencies in the example Stackblitz seem to be much smaller. Counterpoint, @angular/material
is 29MB unpacked, but wouldn't be surprised if this is special-cased. Looking forward to hearing what you're able to learn!
I've got the same problem with my lib. It's working nicely and being verified by ngcc
locally. Two production apps on angular v9 are using it without any issues, but it breaks on StackBlitz.
I even created an issue on ngcc
validation repo https://github.com/angular/ngcc-validation/issues/1384 and they confirmed my lib is properly set. Any news regarding this issue?
Thanks.
Same issue with my library Locl: https://l.staticblitz.com/ngcc/v3/10.0.5/@locl/core@1.0.0 :-/ Any chance to get the complete log @EricSimons please?
edit: turns out it was a peer dependency that was wrong in my lib, I updated the code and it works now!
@ocombe Can you give some more detail? My lib still fails, if I can get that one working maybe I can PR for ngx-monaco-editor as well
I had a peer dependency for @angular/core ^9.0.0 and I was trying to use it in stackblitz with v10.0.5, I changed the peer dependency of the lib to ^10.0.0 and it works in stackblitz with v10.0.5 now
I see, will have to explore that. While I was waiting for a response I snooped your lib and your commit to fix in case it's helpful for anyone else, it's https://github.com/loclapp/locl/commit/71001b1321841738cecfeafee304f1fb4e686e87
Currently ngcc
seems to pass successfully for some of the smaller packages. The test application fails to run with a different error:
Import error, can't find files:
./main
meet the same problem when enabling ivy in ng-zorro-antd https://stackblitz.com/edit/ng-zorro-antd-ivy?file=src%2Fmain.ts
Getting the following error when attempting to add the Kendo UI Grid to an Ivy project on StackBlitz, see sample:
The packages work fine with Ivy in a regular CLI project. Any idea what might be wrong?