-
Notifications
You must be signed in to change notification settings - Fork 12k
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
--prod does not work in Firefox ESR 45.9.0 #9340
Comments
I can reproduce this with Firefox 45.9.0 ESR win 32. Get it here. |
Could you be more specific? |
There is not much more to it. One Warning and one error that
It works just fine with any other browser or when you do not add the BR |
same here, exactly the same behavior and console output |
Same problem here with Firefox 50.1.0. See #9362 The culprit is --target=production |
We are seeing the same issue. The workaround submitted by @TheParad0X does indeed work, but it appears to bypass uglify, which we would greatly desire. I'm hoping to see this fixed as soon as possible. |
We are facing the same problem and leaving the production flag out is no real option, because the dist size is not an option than (because of the missing uglify process). Also all code is effectively visible to everyone way to easily (which might be a problem to closed-source projects) |
We found a temporary workaround by reverting |
#8997 see this issue, will reverting uglifyjs cause this issue again? |
No. |
Oh, guys. I was looking exactly for this issue. Our users post bugs from Firefox 35.1 with the same issue in their dev console. It would be really nice if you could fix the issue. Thanks @nstod for the temporary workaround, the following helped me to figure out the problem:
|
Could this issue have more than one cause? Pinning the webpack plugin version doesn't fix it for me. |
@ericparton Same here. |
@ericparton @vdespa Make sure that in package.lock you have exactly the same version as you pinned. Our app is running on production without any issues after the fix. |
@stas-kh Yeah, I just double checked the package lock and even went as far as to make sure that the only version of the uglifyjs-webpack-plugin in node_modules was 1.1.5. Still no dice. And for what it's worth, I'm also seeing this issue on Firefox 46. |
Solution provided by TheParad0X was working for me until today. Today, with Firefox 50.0.1, it works for some cases, doesn't for others. The error "TypeError: this is undefined" is generated inside a firebase/angular file. Not happening with Chrome. And in dev env, it works fine for Firefox as well. EDIT: going to the top-level url first, and then navigating to the various urls work. But going directly to a path url is failing. Does this work for you all? |
I could make it work for me after using @spanja 's solution and adding two new directories to the postinstall step:
|
This is still not working, this needs more priority. |
If it's an Uglify-ES bug, I think we just need to get a minimum code sample that reproduces the issue and file a bug in their repo. I think the |
Might be related: I confirmed in my testing that it is indeed Here's the constructor that succeeds: Here's the constructor that fails: I'll continue investigating what is causing this, but my guess is function hoisting issues in old versions of FF that UglifyES did not account for. |
This isn't working for @angular/cli@6.1.0-rc.2 either, here's a workaround:
Now open package-lock.json
It would be great if someone working on |
A definitive solution has been identified ? We are planning to migrate from Angular 4 to Angular 6 and it's not possible for our client to lost one of the main browser... |
@WizardPC This problem is present in more than just 6, there's a couple of versions in 5 and 4 that I tried moving too which also experience the same issue. |
Hi all, @suau has provided a good summary of this issue in #11552, but unfortunately we cannot follow through it with. Reverting to an older version of Updating to a newer version of The affected versions of Firefox ESR seem to be <50, but according to https://www.mozilla.org/en-US/firefox/organizations/ the current ESR is 52, which is not affected according to #9340 (comment). Given that the latest Firefox ESR should work, together with the stated Angular browser support for Firefox listing I'm sorry that there isn't anything we can do right now to address the problem you all are experiencing, but in the future we will be looking at alternatives to |
Should help bring down prod build times, @SanderElias reported a ~60% reduction on his project. Should fix angular#9340.
…11996) Should help bring down prod build times, @SanderElias reported a ~60% reduction on his project. Should fix #9340.
Hi @filipesilva, we just updated CLI to a new release but we are still having this issues with FF < 51 Error - TypeError - This is undefined. "devDependencies": { |
For Angular CLI 7 we are replacing It should help address this issue. |
Update : Angular CLI: 6.2.3 Working again on Firefox 45.2.0 🍰 |
Are you sure? How it can be fixed in 6.2.3, which should be 7.0.0 |
Hem... Sorry for false hope ! The teams who build the app (with Jenkins) failed and forgot to use the flag "prod" so the code wasn't minified and working on Firefox... "It's not a bug it's a feature" kind of 👍 |
Hi all, I have upgraded to use the latest build of Terser and Terser Webpack Plugin in Angular 7, and I am still seeing this reproduce in FireFox <50. Has anyone upgraded and has confirmed the issue is fixed in 7.x? |
It has been working for us for quite a while. We are currently running 7.2.1 along with Angular 7.2.0. I would suggest creating a new/blank CLI project and then compare package.json and angular.json |
have the same issue. Transfered my project from angular 6 to 7. Still getting the same problem. |
@GreedyA1 Make sure you have upgraded the AngularCLI as it is the key (rather than Angular) Make sure you have the current CLI version installed globally, then create a new blank CLI project and use a tool like WinMerge to verify that your package.json and other files are up to speed. |
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. |
Hi,
running ´ng serve --prod´ and opening the application in Firefox ESR 45.9.0 throws an exception.
Versions
Repro steps
Observed behavior
Blank page, error in console
Desired behavior
Everything works as expected
BR
Jakob
The text was updated successfully, but these errors were encountered: