I'm trying to learn Angular and my knowledge in terminal is beginner. After I installed Angular and then type ng new my-project
. I get the response ng: command not found
. I've seen other posts that had this problem and I've uninstalled and reinstalled npm and ng.
The last step I took was npm install -g @angular/cli@latest then ng new my-project.
Then I get ng: command not found
.
If they are proper: Find the root global Directory of NPM npm root -g (it will give you root of your global npm store) Uninstall old angular cli with npm uninstall -g angular-cli and npm cache clean. Reinstall new Version of angular npm install -g @angular/cli@latest.
Error 1: 'ng' is not recognized 'ng' is not recognized as an internal or external command. This error is simply telling you that Angular CLI is either not installed or not added to the PATH. To solve this error, first, make sure you're running Node 6.9 or higher.
The ng new command creates an Angular workspace folder and generates a new application skeleton. A workspace can contain multiple applications and libraries. The initial application created by the ng new command is at the top level of the workspace.
Guess You are running on Windows (To make @jowey's answer more straightforward).
$ npm install -g @angular/cli@latest
Next is to rearrange the PATHS toin System Environment Variables, the picture below shows the arrangement.
I had that same problem and just solved it.
make sure you have node installed.
after running
npm i -g @angular/cli
when installation is finished, try re-opening your git bash or whatever you're using or open it in a new folder. boom. it worked for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With