question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uglifier 3.1.0 produces "invalid assignment left-hand side"

See original GitHub issue

Good 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:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
ncuestacommented, Feb 27, 2017

@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.

2reactions
lautiscommented, Feb 27, 2017

@bodrovis, in config/application.rb: config.assets.js_compressor = Uglifier.new(compress: { reduce_vars: false, collapse_vars: false })

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found