generator-angular2 icon indicating copy to clipboard operation
generator-angular2 copied to clipboard

Name of the folder holding the project can't be a number

Open alvarouribe opened this issue 8 years ago • 2 comments

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 } *

alvarouribe avatar Apr 12 '16 01:04 alvarouribe

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.

vuxor avatar Apr 12 '16 05:04 vuxor

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.

chrisdwheatley avatar Apr 15 '16 20:04 chrisdwheatley