Nipuni Madanayake
Nipuni Madanayake

Reputation: 54

Is npm install -g @angular/cli command upgrades Angular version if already I have installed Angular?

I have already installed angular in my laptop. Following details prompts when I check the version using ng --version

Angular CLI: 12.2.15
Node: 14.15.0
Package Manager: npm 8.3.1
OS: win32 x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1202.15 (cli-only)
@angular-devkit/core         12.2.15 (cli-only)
@angular-devkit/schematics   12.2.15 (cli-only)
@schematics/angular          12.2.15 (cli-only)

I am currently doing a project using this angular version. Also, I need to get the message which displays after installing angular/cli, to include in an article. I don't need to upgrade angular, as I have an ongoing project using angular 12. Is npm install -g @angular/cli command upgrades the version?

Upvotes: 1

Views: 5802

Answers (1)

ahtasham nazeer
ahtasham nazeer

Reputation: 126

One thing you can do is mention the latest version of angular using following command npm install -g @angular/[email protected] even npm install -g @angular/cli will also update the angular to the latest stable version one problem can be that your global version is updated with -g tag but local project version is different so try npm install @angular/cli without the global tag

Upvotes: 2

Related Questions