DEV Community

Swati
Swati

Posted on

Angular CLI: Local vs Global Install

Global Installation

npm install -g @angular/cli
Enter fullscreen mode Exit fullscreen mode

A global install allows you to run Angular CLI commands from anywhere on your system.

Local Installation

npm install @angular/cli
Enter fullscreen mode Exit fullscreen mode

This installs the CLI only within your project directory. This ensures all team members use the same CLI version, preventing version mismatch issues during development or deployment.

To install specific version of Angular CLI locally, use following command:

npm install @angular/cli@19.2.15
Enter fullscreen mode Exit fullscreen mode

Check version of installed cli using,

ng version
Enter fullscreen mode Exit fullscreen mode

Top comments (0)