-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Unexpected token: eof (undefined) during uglify'ing #684
Unexpected token: eof (undefined) during uglify'ing #684
Comments
It may be related to release of moment.js 2.25. |
Two things @devdemi:
|
I still get the same error using moment 2.25.1. Rollback moment to v2.24.0, as suggested by @andygoalkeeper, seems to work 👍 |
I believe this should be fixed at the moment level if reverting to 2.24.0 fixes it! I see a bunch of people pitching in on issues there, so I have hope that this problem is fixed eventually. The error message is very interesting though. It's as if the file ends without closing a function or parens. Can anyone reproduce this same error message with another bundler such as webpack or rollup? |
as suggested terser/terser#684 here ty @erikap!
as suggested terser/terser#684 here
Rolling back moment package DOES NOT HELP! |
I'm not able to determine where in Moment this error is originating. Anyone have tips on enabling some debugging to get an idea about where to start looking? |
ember-cli/ember-cli#9206. |
To ensure a revert: If you're using yarn you can do as was mentioned here. With npm, you can |
What is the bundler? I've been thinking of enabling some options to help debugging in the future, such as "snitching" what was the input code by placing it in some files, since 99% of terser users use it through a bundler, or making terser "pass-through", since it might be easier to change Terser options than to disable. Something you can do for now, is to try and disable Terser entirely and look at the output. Is it valid javascript that you can run in your browser? If it is, that's a Terser bug. Except for You can also enable source-map-support to make the stack trace make some more sense. |
Thanks @fabiosantoscode feels like I should have thought of that! The bundler is Broccoli and ember-cli, turning off minification there does produce invalid JS so this issue is not with terser. Now that I have some output to work with I'll start looking for the issue in there. |
Great, I'll be closing this then! Thanks! |
This should be fixed for ember apps with the release of |
What's going on? Double minifying is inefficient but it's certainly possible. It's not like Terser is unable to parse its own output. |
Bumbing |
@fabiosantoscode I don't think moment is minifying with terser internally, but I also don't think the issue is actually the minification itself as I can run |
- The issue is described here: terser/terser#684
Error during uglify'ing my project
The text was updated successfully, but these errors were encountered: