Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bogacg opened this issue Mar 24, 2017 · 7 comments

Comments

@bogacg
Copy link

bogacg commented Mar 24, 2017

- [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

@bogacg bogacg changed the title ERROR trying to generate Angular 2 project: --ng2' is not registered with the new command ERROR trying to generate Angular 2 project: --ng2 is not registered with the new command Mar 24, 2017
@dannypule
Copy link

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

@RicardoVaranda
Copy link
Contributor

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.

@filipesilva
Copy link
Contributor

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

@bogacg
Copy link
Author

bogacg commented Mar 24, 2017

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

@dannypule
Copy link

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

@bogacg
Copy link
Author

bogacg commented Mar 24, 2017

@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.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants