-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
"ReferenceError: Invalid left-hand side expression in postfix operation" in production build #1681
Comments
@Timer Any ideas? Seems to only occur for production build. |
Junk builds are being produced.
note |
I have a feeling one of our dependencies had a dep that updated and introduced a bug. Not sure if webpack or babel's fault, but looks like a compilation issue. I'll have time to look at this in a little bit. |
I would be interested to know if the |
https://github.com/mishoo/UglifyJS2 recently released, but not when this error started happening. |
I'm going to bet the regression was introduced here: They enabled something called reduce_vars by default, which I bet is replacing the loop variable with it's initial value. |
Good investigation. |
Shall we change our Uglify options in 0.9.3 to work around this? |
I'm a bit tight on time for a few hours, but can you make a PR setting the uglify flag |
I'm on it |
Wow! I can't believe I didn't see that bug report (maybe I should've looked, would've saved me a few mins 😆). |
OK, I think we don't need to fix it on our end because Uglify will push out a fix soon. |
Fixed in |
Update: if you see this, you have a buggy version of UglifyJS (
2.8.0
).Run
rm -rf node_modules
and thennpm install
(oryarn
).Then verify that
node_modules/uglify-js/package.json
has at least2.8.1
in theversion
field. If not, you might need to clean your cache, or update your lockfile or shrinkwrap.Original Post
I see this both in Windows and OS X tests.
The text was updated successfully, but these errors were encountered: