Introduction
We occasionally see errors like the one below that prevent us from starting a new project. I’ve outlined ways to fix the problem here.
Step 1
Start CMD in administrator mode.
Step 2
Remove Angular cli.
npm uninstall -g @angular/cli
Step 3
From the appdata folder, delete the npm package files.
Step 4
By hitting Windows + R, the Run menu will appear. then enter “%appdata%” and hit “OK.”
Step 5
From the Roaming folder you received in Explorer, open the npm
Step 6
If there are any, remove the ng and ng.cmd files from the npm folder.
If @angular and the angular/cli folder are present, open the node modules
Step 7
Installing the Angular cli again
npm install -g @angular/cli
Using the command, create a new Project.
The ng serve command is used to generate and run the application.