generator-cg-angular icon indicating copy to clipboard operation
generator-cg-angular copied to clipboard

creating new module fails if syntax errors

Open jaman1020 opened this issue 9 years ago • 1 comments

Not sure what/if can be done about this, but when you try to generate a module when your existing code has a syntax error, it fails. The error wasn't very helpful - although it was telling me the line and the error in my JS, I didn't immediately make the connection. Maybe some context can be added?

Error: Line 53: Unexpected token } at throwError (/usr/local/lib/node_modules/generator-cg-angular/node_modules/ng-parse-module/node_modules/esprima/esprima.js:1156:21) at throwUnexpected (/usr/local/lib/node_modules/generator-cg-angular/node_modules/ng-parse-module/node_modules/esprima/esprima.js:1213:9) at parsePrimaryExpression (/usr/local/lib/node_modules/generator-cg-angular/node_modules/ng-parse-module/node_modules/esprima/esprima.js:1567:16) at /usr/local/lib/node_modules/generator-cg-angular/node_modules/ng-parse-module/node_modules/esprima/esprima.js:3609:38 at trackLeftHandSideExpressionAllowCall (/usr/local/lib/node_modules/generator-cg-angular/node_modules/ng-parse-module/node_modules/esprima/esprima.js:3504:61) at parsePostfixExpression (/usr/local/lib/node_modules/generator-cg-angular/node_modules/ng-parse-module/node_modules/esprima/esprima.js:1703:20) at /usr/local/lib/node_modules/generator-cg-angular/node_modules/ng-parse-module/node_modules/esprima/esprima

jaman1020 avatar Jan 28 '15 03:01 jaman1020

This happens when your app.js has ES2015 syntax in it

jziggas avatar Jan 18 '17 21:01 jziggas