Skip to main content

Prerequisites

Before you begin, ensure your development environment includes the following:

Node.js

Angular requires an active LTS or maintenance LTS version of Node.js. Check the specific version requirements:
  • Minimum version: Node.js 18.x or later
  • Recommended: Latest LTS version
Verify your Node.js installation:
node --version

npm or pnpm

Angular uses npm (Node Package Manager) or pnpm for dependency management. npm is included with Node.js. Verify your package manager:
npm --version
Or if using pnpm:
pnpm --version

Install Angular CLI

The Angular CLI is a command-line interface tool that helps you initialize, develop, scaffold, and maintain Angular applications.

Install globally

Install the Angular CLI globally using npm:
npm install -g @angular/cli
Or using pnpm:
pnpm add -g @angular/cli
The -g flag installs the CLI globally, making the ng command available from any directory.

Verify installation

After installation, verify that the Angular CLI is installed correctly:
ng version
This command displays the installed Angular CLI version along with Node.js and operating system information:
Angular CLI: 21.2.0
Node: 20.14.8
Package Manager: npm 10.30.3
OS: darwin x64

System requirements

Operating systems

Angular CLI supports the following operating systems:
  • Windows: Windows 10 or later
  • macOS: macOS 10.13 or later
  • Linux: Most modern Linux distributions

Browsers

Angular applications run in modern browsers. The framework supports:
  • Chrome (latest)
  • Firefox (latest)
  • Edge (latest)
  • Safari (latest)

TypeScript

Angular is built with TypeScript. The Angular CLI automatically installs the correct TypeScript version for your Angular version. Current Angular versions use:
  • TypeScript: 5.9.3 or later
You don’t need to install TypeScript separately. The Angular CLI manages TypeScript as a project dependency.

Update Angular CLI

To update the Angular CLI to the latest version:
npm install -g @angular/cli@latest
For existing projects, update local CLI version:
ng update @angular/cli @angular/core

Troubleshooting

Permission errors on macOS/Linux

If you encounter permission errors during global installation, avoid using sudo. Instead, configure npm to install global packages in your home directory:
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
Add the export line to your ~/.profile or ~/.bashrc file.

Clear cache

If you experience installation issues, clear the npm cache:
npm cache clean --force

Next steps

Now that Angular CLI is installed, you’re ready to create your first Angular application.

Create your first app

Learn how to create and run your first Angular application