user8570495
user8570495

Reputation: 1835

what's the relationship between npm packages angular-cli and @angular/cli?

What's the relationship between npm packages angular-cli and @angular/cli? https://cli.angular.io/ refers to @angular/cli in its documentation. Is angular-cli simply a previous version of the CLI which is hosted for support reasons? Or is angular-cli simply an alias which now redirects to @angular/cli?

Upvotes: 2

Views: 221

Answers (4)

angularconsulting.au
angularconsulting.au

Reputation: 28319

You can figureout that yourself by simply running

npm show angular-cli version

and

npm show @angular/cli version

this way you can see that version 1.0.0-beta.28.3 of angular-cli was the latest that way back if you compare that with the @angular/cli latest version.

Also if you scroll down at https://github.com/angular/angular-cli to Updating Angular CLI section:

If you're using Angular CLI 1.0.0-beta.28 or less, you need to uninstall angular-cli package. It should be done due to changing of package's name and scope from angular-cli to @angular/cli:

npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli

To install the latest one

npm cache clean
npm install -g @angular/cli@latest

To check your cli version run ng -v

Upvotes: 2

yurzui
yurzui

Reputation: 214255

angular-cli is Angular CLI of version 1.0.0-beta.28 or less.

Then they had changed package's name and scope from angular-cli to @angular/cli

So prefer installing @angular/cli as it is current package name

Upvotes: 0

Aniruddha Das
Aniruddha Das

Reputation: 21698

packages angular-cli is deprecated and no longer valid. When angular team started they created this one but in future they moved it to @angular/cli.

So don't use angular-cli as its old and not updated and may be hold error full code.

And just use @angular/cli as it points to angular 4.x.x which is latest and keep updated by the angular team.

Upvotes: 0

Fenton
Fenton

Reputation: 251172

On NPM, packages can be published by an organisation, which groups the packages and lets you have some confidence in the source.

The @angular part of the package name denotes the Angular organisation on NPM. I would take an educated guess that they may have previously added their packages before creating the organisation and publishing the packages there.

In this case, I recommend that you use the packages from the @angular organisation.

Upvotes: 0

Related Questions