generator-angular2
generator-angular2 copied to clipboard
Name of the folder holding the project can't be a number
This commands:
- mkdir 2angulp
- cd 2angulp
- yo angular2
Got the following error:
13:20:50] Using gulpfile /Library/WebServer/Documents/2angulp/gulpfile.js [13:20:50] Starting 'dependencies'... [13:20:50] Starting 'js'... [13:20:50] Starting 'html'... [13:20:50] Starting 'css'... [13:20:50] Finished 'css' after 14 ms
*events.js:154 throw er; // Unhandled 'error' event ^ MultipleErrors: 2-angulp:11:14: Unexpected token 2 2-angulp:11:15: Unexpected token Angulp 2-angulp:11:22: Unexpected token { 2-angulp:13:17: Semi-colon expected 2-angulp:17:1: Unexpected token } *
Please set the app name when you create new project. If you don't do that, the generator will take current working folder name as your app name and in javascript variables can't start with number.
We could possibly do something to work around this or if not then at least provide a clearer warning message as to what went wrong.