Uglifier 3.1.0 produces "invalid assignment left-hand side"
See original GitHub issueGood day. After updating to Uglifier 3.1.0 I am starting to get a JS error in production saying “invalid assignment left-hand side”. It happens on Heroku with Rails 5, Ruby 2.3. I am not really sure whether this should be reported here or at UglifyJS repo. After some inspection it appeared that the following line is problematic:
do 1 = 1, u /= 1, dt.style(t, e, u + a); while (1 = o() / s, !1)
This is a deobfuscated line of code that relates to jQuery 1 (it happens with jQuery 2 as well). Switching back to Uglifier 3.0.4 solves the problem. I can send minified and deobfuscated js files.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:14 (4 by maintainers)
Top Results From Across the Web
SyntaxError: invalid assignment left-hand side - MDN Web Docs
The JavaScript exception "invalid assignment left-hand side" occurs when there was an unexpected assignment somewhere.
Read more >Rails JavaScript error in production: 'Invalid left-hand side in ...
It was bug in Uglifier 3.1.0 (#110), the author have released ... Seems uglifier 3.1.0 is causing this issue, so I rolled back...
Read more >uglify-js - NPM Package Overview - Socket.dev
Start using Socket to analyze uglify-js and its 0 dependencies to secure ... will assume that those functions do not produce side effects....
Read more >JavaScript - ReferenceError: invalid assignment left-hand side
In this post we'll look at a few code examples to illustrate some common methods of producing an Invalid Left-Hand Assignment error, ...
Read more >@uirouter/core | Yarn - Package Manager
Routing frameworks for SPAs update the browser's URL as the user navigates through the app. Conversely, this allows changes to the browser's URL...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lautis Thanks for your dedication! This bug just hit us and you shipped the fix before we could even determine the root cause.
Just stopped by to say you’re awesome and, once again, thank you for your hard work.
@bodrovis, in config/application.rb:
config.assets.js_compressor = Uglifier.new(compress: { reduce_vars: false, collapse_vars: false })