Codementor Events

'ng' is not recognized

Published Aug 19, 2019
'ng' is not recognized

Some errors/issues are quite annoying. I had my "ng" commands working, not sure what I did or changed. I started getting ng command error.

The error simply means Angular Cli is not installed or npm is not properly configured.

Step 1

run this command : npm list -g --depth 0

You should get

Capture1.PNG

If @angular/cli is not included, you need to run > "npm install -g @angular/cli" then repeate this step 1 again

Step 2

Again, run "npm list -g --depth 0" this will output your npm global path(first line). Copy this path, open your environment variable and add it to your user account. See the images below:

Capture1.PNG

Capture1.PNG

Step 3
Open new command window, then

Capture1.PNG

Done!!!

Discover and read more posts from Bolaji Musiliu
get started