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.

UglifyJS throw 'Invalid assignment' error

See original GitHub issue

Hi,

Thanks for this awesome library!

I’m creating a component library using an nwb boilerplate (https://github.com/insin/nwb/blob/master/docs/guides/ReactComponents.md#developing-react-components-and-libraries-with-nwb).

Once I added react-element-to-jsx-string the build fails with the following error:

Failed to compile with 1 error.

 ERROR  in demo.1990f3e7.js from UglifyJs
Invalid assignment [./~/stringify-object/index.js:6,0][demo.1990f3e7.js:11007,34]

Is this an issue with stringify-object?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
vvocommented, Jun 26, 2017

uglifyjs does not supports minifying ES2015 (this is sad) and stringify-object is not transpiled to ES5.

image

I found this on uglifyjs website, maybe try https://github.com/mishoo/UglifyJS2/tree/harmony and let me know!

0reactions
jmorricecommented, Aug 7, 2017

Thanks guys!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR in main.xxx.js from UglifyJs Invalid assignment [main ...
When running the command: npm run build I get this error: clean-webpack-plugin: ..../internals/webpack/build has been removed.
Read more >
Optimizing --> Invalid assignment error - Elastic Discuss
Optimizing --> Invalid assignment error​​ My plugin runs perfect when using ./bin/kibana --dev the problem occurs once the production optimizing ...
Read more >
uglify-js - npm
Start using uglify-js in your project by running `npm i uglify-js`. There are 4202 other projects in the npm registry using uglify-js.
Read more >
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 >
Can we use my plain JavaScript piece of code while creating ...
now while building its throwing error Unexpected token: keyword «const» ... tried with var as well but this time its giving Invalid Assignment...
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