cgross / generator-cg-angular

Yeoman generator for Enterprise Angular projects.
MIT License
592 stars 198 forks source link

creating new module fails if syntax errors #96

Open jaman1020 opened 9 years ago

jaman1020 commented 9 years ago

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

jziggas commented 7 years ago

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