Skip to content
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

SyntaxError: Unexpected token: name (index)] #457

Closed
ioana-m opened this issue Sep 24, 2018 · 3 comments · May be fixed by dyna-dot/create-react-app#9, anyulled/rhte-demo#3 or saurabharch/create-react-app#3

Comments

@ioana-m
Copy link

ioana-m commented Sep 24, 2018

Hi,

I was using version 1.1.5 successfully, and now with version 1.2.0 I get the following error when using uglify to minimize my code (I use gulp-uglify, 1.5.4)

bower_components\sockjs-client\dist\sockjs.js: SyntaxError: Unexpected token: name (index)]
lineNumber: 4054

I returned to using 1.1.5 but would appreciate if you fix the problem, or tell me if I am doing something wrong.

Thank you.

@brycekahle
Copy link
Contributor

It looks like one of the dependencies debug started using ES6:

let index = 0;

I suggest you upgrade your gulp-uglify. This project uses it also and version 3.0.1 is working great.

@brycekahle
Copy link
Contributor

Also, is there a reason you cannot use the already minified version? That version removes debug and thus does not have this problem.

@brycekahle
Copy link
Contributor

Fixed in 1.3.0 by downgrading debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants