-
Notifications
You must be signed in to change notification settings - Fork 12k
@angular-devkit/[email protected] - production build not working in IE #16366
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
Comments
Can you provide the full output of executing |
Sure @clydin : Angular CLI: 8.3.20 Package Version@angular-devkit/architect 0.803.20 |
By default in version 8, angular Team enable There are a couple of options that you can do if you want to have 1. Disable differential loading completely, (Not recommended)You can turn differential loading off by changing the target from es2015 to es5 in your 2. Have multiple configuration for serve.Create a new tsconfig tsconfig.es5.json next to tsconfig.app.json with the below contents
FYI- |
@kumaresan-subramani |
IE broke for me as well in my current project, only change was updating the cli from .19 to .20 in the production environment. I rolled back @angular-devkit/build-angular to 0.803.19 and it works again, I'm not injecting NgZone though anywhere. |
As this appears to be highly correlated to the specifics of a project, a reproduction would be incredibly helpful to troubleshoot the issue. For anyone with the time and resources, can you provide a reproduction that demonstrates the problem? I attempted to create one from the information contained in the original issue but was unable to trigger the problem. Also, if possible can you try your projects with the release candidate for 9.0 (currently 9.0.0-rc.5)? |
So this is only a problem with my large project, I have 2 other ones that do not have this issue. All three have a similar bootstrapping process, I use an external config and fetch it using the APP_INITIALIZER token. My large project has many more services to handle things like logging in, but I'm not doing anything with zones explicitly, the config stuff is the most unique thing my apps are doing. I spent a good chunk of yesterday playing around and trying to get my large project to work with IE. I tried using 9.0.0-rc5 but was unable to get IE to work using es5 as my target in the tsconfig and using ng serve. I got the other browsers working though on 9.0.0-rc5, but I'm pretty stumped now and not sure what is causing this bug in my one project. |
I tried to reproduce this IE problem but had no success to find a small reproduction project. I agree this issue is project-specific. The sad thing is I have really no clue what in my thousands of lines of code is trigerring the error I have (which is not the same error message than psimonova, see #16405). Up to now I could only reproduce the crash with a prod deployment using differential loading, never with @clydin Can CLI 9 compile an Angular 8 project (with anything like a -force optional parameter) ? I guess not due to ViewEngine being replaced by Ivy, but still asking. |
I'm not sure exactly how to reproduce this in a minimal environment yet and can't share my codebase, but if it helps add any context, we saw a similar problem but with a different error - it is as if some kind of polyfill is missing. For us it only affected production builds in IE 11, manifesting itself with errors along the lines of:
and, perhaps as a consequence of that, Downgrading build-angular and angular-cli from 0.803.20 by one patch version fixes it in our case:
|
My team is having the same issue in both of our applications
to
gives errors in IE.
I'll try to find a minimal reproduction as I can't share the real applications edit if it helps the (minified) code that's throwing the error is
the error is at edit 2 could it be related to this issue? angular/angular#31956 we're on the latest beta for flex-layout so it's not the exact same issue |
I did some more digging by looking through the changes in the last release, thankfully there weren't that many I don't know what it does or why that fixes it but it's something to do with enabling downlevel iteration that's breaking things |
Thanks for finding a likely culprit @RichardMisiak! I was just about to post our public repo in case it's helpful as an example (though the above is most likely more useful now) - https://github.com/thebiggive/donate-frontend We also have a dependency on I think we had a couple of different crashes depending on which page the SSR'd app was first loaded with. The |
@RichardMisiak, @NoelLH : No flex-layout lib on my side but crashing on IE. Seems every project has a different error message. @RichardMisiak Thanks for the digging and finding this commit. It seems related to differential loading, which perfectly explains why the error is only showing after a real production build and never with |
Even me also faced same issue when i upgrade to angular 8.3.20 version . "compilerOptions": { |
I can confirm the regression. I did a downgrade to 8.3.19 and everything is working fine. |
Thank you for recommending a downgrade, I had NO idea what to do to fix this as I couldn't reproduce in local. Everything works fine in prod now with version 8.3.19 |
OK now my other project has the same bug, so 2 out of the 3 have it. The thing these 2 share in common is that they are relatively old and were generated with an older version of the CLI, then upgraded to 8. |
I've been tinkering around with this and got one of the 2 broken projects working. The issue with it was a third party community package. This particular one was ngx-quicklink, removing it and upgrading to angular 9 fixes IE. However, if I just remove it and don't upgrade to 9 and stay at 8 I still get the error in IE. |
Closes via #16458 |
I am still able to repro this issue using these .... @angular-devkit/architect 0.803.22 Downgrading to ... Is anyone else facing the same ? |
Unable to run npm run build
This version of CLI is only compatible with Angular versions 0.0.0 || ^9.0.0-beta || >=9.0.0 <10.0.0, Please visit the link below to find instructions on how to update Angular. npm ERR! code ELIFECYCLE npm ERR! A complete log of this run can be found in: debug log mentioned below. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Is this a regression?
Yes, the previous version in which this bug was not present was: @angular-devkit/[email protected]
Description
Service with injected NgZone service
ng build -c production build now not working IE
🔬 Minimal Reproduction
tsconfig.json:
compilerOptions.target = es2015
compilerOptions.module = esNext
angular.json:
architect.build.configurations.production.aot = true
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
IE 11
The text was updated successfully, but these errors were encountered: