Angular-cli: ERROR trying to generate Angular 2 project: --ng2 is not registered with the new command

Created on 24 Mar 2017  路  7Comments  路  Source: angular/angular-cli

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

1.0.0

Repro steps.

ng new TestApp --ng2

The log given by the failure.

The option '--ng2' is not registered with the new command. Run 'ng new --help' for a list of supported options.

Desired functionality.

That it generates a new project with Angular v.2.x

Mention any other details that might be useful.

See #5566

While trying it better use -si:

ng new TestApp -si --ng2

Most helpful comment

I think this is wrong. There will be many libraries / apps that wont make the passage right away.

All 7 comments

I would also like to know how to create an ng2 app with Angular CLI 1.0.0.

Hi @bogacg & @dannypule,

The cli no longer supports creating new projects with ng2 since ng4 is out. This does not mean that it stopped supporting it though you can still build and serve your applications just like before but ng new will always be on the latest major release.

Closing as answered by @RicardoVaranda, there's really nothing else I could say there 馃槃

I think this is wrong. There will be many libraries / apps that wont make the passage right away.

What happens in the interim period when modules like @ngrx/store don't yet support Angular 4?

Only work around for devs wanting to use ng2 for now would be to install an older version of Angular CLI such as 1.0.0rc4

@dannypule no, you can still install latest version, but have to manually fall back Angular module versions in package.json after ng new. Yet I don't like this forced.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hartjo picture hartjo  路  3Comments

ericel picture ericel  路  3Comments

IngvarKofoed picture IngvarKofoed  路  3Comments

brtnshrdr picture brtnshrdr  路  3Comments

jmurphzyo picture jmurphzyo  路  3Comments