AndrewRedican / react-json-editor-ajrm

A modular, easy to use, react component, to view, edit, and debug javascript objects.
MIT License
355 stars 125 forks source link

Uglify raises an error `error name(clonedIdentity)` #86

Closed WillFr closed 1 year ago

WillFr commented 5 years ago
  1. What version of RJEA are you using (react-json-editor-ajrm version)? 2.5.8
  2. What operating system and processor architecture are you using? MacOS + Linux for build
  3. What did you do? attempted to package an SPA using RJEA, which uses uglify
  4. What did you expect to see? a successful build, including the uglify part
  5. What did you see instead? an error while running uglify: uglify error name(clonedIdentity)

Apologies for not looking more in detail into this. Our build machine failed to package the component (ES5 or ES6). Uglify raises an error error name(clonedIdentity) when attempting to uglify RJEA. It would be great if you could look into this

SachsKaylee commented 5 years ago

Hello,

I'd need more info on this as I'm not familiar with your build setup. What are you using for ugilyfication, do other tools transpile the code first, etc...

I'll make an assumption here and claim that this looks like a bug in the uglyfier since this component is valid ES5/ES6 code, but maybe I'm missing something here.

charliehill1 commented 5 years ago

Hi,

The uglify setup that we're using is uglify-js which is ran in parallel using the node child_process lib.

qianxuemin commented 5 years ago

I also ran into this problem;the error message is

ERROR in js/vendors~main.js from UglifyJs
Unexpected token: name (clonedIdentity) [js/vendors~main.js:1769,6]

i used webpack4 to build my project; the configuration as follows.

optimization: {
    minimize: true // 进行代码压缩 会报错
  },

if the configuration as follows.,the result is true

optimization: {
    minimize: false
  },
harrysingh commented 5 years ago

I also faced the same problem. Adding the component to my package..json downgraded lot of other dependencies as well.

Please upgrade the dependencies to a newer version.

shpsi commented 5 years ago

@harrysingh can you help me out how you solved this problem? I am also getting npm rub build failure ERROR in main-b375b17976fedfd35d18.min.js from UglifyJs Invalid assignment [main-b375b17976fedfd35d18.min.js:137127,24]