Before you can build an Angular app you need three things on your computer: Node.js, the Angular command-line tool (the CLI), and a code editor. This lesson walks through each one and shows how to confirm that everything works.
What you will learn
- What Node.js and npm do in an Angular project
- How to install the Angular CLI
- How to check your setup and fix common errors
What you need
- Node.js runs the build tools on your computer. It comes with npm, the package manager that downloads libraries.
- The Angular CLI is the
ngcommand that creates, serves, tests and builds projects. - A code editor. Visual Studio Code is a popular free choice. Install the "Angular Language Service" extension for better hints in templates.
- A terminal. Any terminal works, including the one built into your editor.
Step 1: Install Node.js
Download the current LTS version from nodejs.org and run the installer. Angular only supports certain Node versions. At the time of writing, Angular 22 needs Node 22.22.3 or newer, 24.15 or newer, or 26 and above. If your version is too old, the CLI stops with a message telling you the minimum version.
Check what you have installed:
node -v
npm -v
Both commands should print a version number.
Step 2: Install the Angular CLI
npm install -g @angular/cli
The -g flag installs it globally, so the ng command works from any folder. Check that it works:
ng version
You should see a banner with the CLI version, your Node version and a table of Angular packages. Inside a project the table lists the installed Angular packages as well.
Step 3: Check your editor
Open your editor and its built-in terminal. Make sure ng version works there too. If it does, you are ready for the next lesson.
Fixing common problems
- "ng is not recognized" or "command not found": the terminal cannot find the CLI. Close and reopen the terminal, or make sure npm's global folder is on your PATH.
- Permission errors (EACCES) on install: avoid using
sudowith npm. Install Node with a version manager such as nvm, which keeps everything in your user folder. - "The Angular CLI requires a minimum Node.js version": your Node is too old. Install a newer LTS release and run the command again.
- Slow or failing installs behind a company proxy: configure npm with your proxy settings, or ask your IT team for the registry address.
Try it yourself
- Run
node -v,npm -vandng version, and write down the three versions. - Open the Angular documentation at angular.dev and find the "Installation" page.
- Create a folder for this course, such as
angular-course, and open it in your editor.
Quick check
- Which tool downloads libraries for your project?
- What does the
-gflag do innpm install -g? - What should you do if the CLI says your Node.js version is too old?
Next, continue with Angular Course Roadmap and Complete Topic Index (Beginner to Advanced).