Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I've installed angular cli but its showing not recognized in cmd

Actually I've installed Nodejs, then npm, then angular cli properly (afaik). But in windows cmd and in git bash, its showing "ng --version" as:

ng is not recognized as an internal or external command, operable program or batch file.

from windows command prompt

from windows command prompt

from github bash

from github bash

but when i try this command with node command prompt, it showing the ng version.

from nodejs cli

Because of this, i cannot use ng serve. Also i've tried to install bower and gulp. Getting the same "not recognised" error for both of them. Help to solve this.

Thanks and Regards, sharfudeen

like image 869
RuD3B0y Avatar asked Jul 22 '17 11:07

RuD3B0y


People also ask

How do I know if angular is installed in CMD?

Go to your folder path in cmd where your angular is installed and type ng --version it will show your angular version.

Why is not recognized in CMD?

The “not recognized as internal command” error usually occurs because the computer cannot find the executable file it is trying to start. However, you can provide the full path to your executable and then it should run without any problem. Launch a Command Prompt window on your PC.

Why npm command is not working on CMD?

The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.

Why ‘Ng’ is not recognized after installing the angular CLI?

ng command not recognized after installing the Angular CLI. ‘ng’ is not recognized as an internal or external command, operable program or batch file. This error I found to be due to improper installation or configuration of Angular CLI in the local machine.

Why Ng is not recognized as an internal or external command?

In this article, you will learn how to solve ng is not recognized as an internal or external command in Angular. With an operable program or batch file, this problem occurs when your path is missing something from the environment variable.

Is it possible to show ng version with node command?

But in windows cmd and in git bash, its showing "ng --version" as: ng is not recognized as an internal or external command, operable program or batch file. but when i try this command with node command prompt, it showing the ng version.

How do I install AngularJS on Windows?

Use NodeJS command prompt rather Windows Command, NodeJs command prompt will recognize ng. Just open your command prompt (run as administrator). Ensure node --v is 6.9.0 or higher and npm --v is 3.0.0 r higher. After that run the following command: npm install -g @angular/cli


1 Answers

First of all please ensure you have installed Node.js on your machine

If You have already installed Node.js your machine you can take the Node.js command prompt instead of windows command prompt

enter image description here

and then try the command npm ng --version

enter image description here

On windows prompt go to your project local directory(use command cd projectdirectorypath) and then use the same command npm ng --version

like image 71
Jameel Moideen Avatar answered Oct 19 '22 23:10

Jameel Moideen