angular-cli: ng init missing

OS : Windows 7

@angular/cli: 1.0.0-rc.0 node: 6.9.2 os: win32 x64 @angular/common: 2.4.8 @angular/compiler: 2.4.8 @angular/core: 2.4.8 @angular/forms: 2.4.8 @angular/http: 2.4.8 @angular/platform-browser: 2.4.8 @angular/platform-browser-dynamic: 2.4.8 @angular/router: 3.4.8

I have a working angular project , I tried ng init, but it says init is missing

The specified command init is invalid. For available options, see `ng help`.

how do I CLIfy an existing project ?


About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 7
  • Comments: 23 (5 by maintainers)

Most upvoted comments

dude, are you for real ? just read the bloody thread instead of blindly asking the same question I did 2 weeks ago

command ng new --src=. returns:

The option ‘–src’ is not registered with the new command. Run ng new --help for a list of supported options. The “ng new” command requires a name argument to be specified. For more details, use “ng help”.

When I am creating a new project I am getting the follwoing and nothing created. Installed/Reinstalled angular2-eclipse and no changes. \Ang2Prj>ng init The specified command init is invalid. For available options, see ng help.

I used ng new my-app command and it works fine

@Brocco Thanks for the quick response! I’m just glad that its on the road map for future releases!

@hieutranagi47 To create an angular project from an existing blank git repository, just run “ng new [your-git-name]” in the parent folder. It will generate the files inside the existing folder and skip git init. All fine after that…

“ng init” is one of awesome solution to create a project from blank git repository, but, from now, we must create a project first, then init git later. so sad!

Closing this as fixed. You can also call ng new --src=. which may or may not overwrite some files. Use with caution, but it could get you started.