-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while compiling in AOT mode with Angular 9 #1976
Comments
Hello, |
In case no one gets back to you quickly, I know this works with Angular 7. I haven't tested 8 thoroughly. You can use 7 to get started if you don't mind being a few versions behind and missing some of the features 8/9 provide |
it also works with angular 8... our current setup. i wanted to try out ivy |
@mibto Thank you so much for updating the dependencies for angular-comilers and publishing to Atmosphere. One more question though. I'm trying to get AOT to work with meteor 1.10.1 but I'm still running into issues. I'm using mibto:angular-compilers 0.3.18 which works great with AOT disabled (no more node-sass errors thanks to your update). However, if I activate the AOT flag
(while processing files with mibto:angular-compilers) I'm struggling to find a solution for this, did anyone manage to find a fix or workaround? |
@cosmin-dumitrache can you please try it with version 0.3.4 - i have it working with AOT and angular 8.2.14 and meteor 1.9.2 |
@mibto Thanks for the suggestion, but no luck with meteor 1.10.1 :( One strange thing is that when I try to add angular-compilers 0.3.4 it picks up other versions, not sure why:
But I did that anyway, and changed Angular to 8.2.14 (still using meteor 1.10.1). The build then produced this error when processing with mibto:angular-compilers It might work with meteor 1.9.2 as you said, but as far as I know you need the Cordova update in meteor 1.10.1 to be able to produce a version of swift acceptable by the latest XCode. I was fine with meteor 1.8 to be honest, but I can't deploy my app anymore because of swift, so I don't really have an option to not update to 1.10.1. Mind you, if I disable AOT, it works, but my app suffers a massive performance penalty. |
meteor updated to the latest 1.10.2 |
I've installed meteor 1.10.2, using mibto:angular-compilers (had to clone from github and throw in my packages folder due to some problems including scss files). Installed Angular 9. Still getting this kind of error:
Any idea where I might be going wrong? |
@aas395 You can try turning off Ivy as described here: https://forums.meteor.com/t/meteor-1-10-1-breaks-angular-integration-when-aot-is-enabled/52511 That will fix your problem but then you'll get a new problem: |
@mibto I saw you patching the compiler by setting the compiler-host to an empty object: I got better results (and do not have the error of With these changes I'm able to run Angular Any hint for a solution? If you don't have, I'll try to see what I can get, but if someone already has the solution, there's no need to reinvent the wheel 😅 |
@SimonSimCity You are correct, patching the compiler host with an empty object tripped me up as well. I think the easiest fix for you to get rid of the analyzeModulesAsync problem is to turn off Ivy. I'll publish a solution using this approach soon in the form of a new angular-meteor atmosphere package. |
@cosmin-dumitrache When turning off Ivy (by setting
In the file It just works when setting the environment variable |
I've published an updated version of angular-compilers that uses the disable Ivy trick. You can use it by replacing your dependency to angular-compilers with digicore:angular-compilers (version 0.4.2). Hopefully this will be useful for people struggling to run Meteor 1.11 + Angular 10 with AOT enabled. @SimonSimCity Not sure why you're getting the scss issue, I haven't seen that type of error in my project. |
@cosmin-dumitrache thank you very much for the better / proper fix. Do you also get following "error" when using meteor --production or meteor build:
i also get this "error" in this angular-meteor example project. it looks like, that my application runs correctly after the build |
Does it work right now with version 0.4.0? |
I'm trying to use Angular 9 in my project to take advantage of Ivy. I upgraded my Angular version and then switched on AOT mode. Angular compiles twice (is this intended?) and then I get this error:
Meteor 1.9.2
Angular 9.0.5
angular-compilers 0.3.4
@babel/core 7.8.6
I'm new to this entire stack so please let me know if you need more information from me in order to help me figure out what's going on.
The text was updated successfully, but these errors were encountered: