Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fstbraz opened this issue Apr 7, 2017 · 16 comments

Comments

Projects
None yet
7 participants
@fstbraz
Copy link

commented Apr 7, 2017

Bug Report

Versions

Node v6.10.1
NPM 3.10.10
Windows 10

Repro steps

npm install -g @angular/cli@latest

The log given by the failure

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

Details

Hello, after installing angular-cli the 'ng' command simply doesn't work on windows.
There are other issues reporting this bug, but they don't have clear solutions.
Note: I don't have administrator access on this computer.

screnshoot

@MRokas

This comment has been minimized.

Copy link

commented Apr 7, 2017

What does echo %PATH% return? And where did angular-cli get installed?

@fstbraz

This comment has been minimized.

Copy link
Author

commented Apr 7, 2017

The echo %PATH% returns C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Skype\Phone;C:\Program Files\TortoiseSVN\bin;C:\Program Files\nodejs;C:\Users\fausto.braz.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Users\fausto.braz\AppData\Local\Microsoft\WindowsApps;C:\Users\fausto.braz\AppData\Local\atom\bin

@MRokas

This comment has been minimized.

Copy link

commented Apr 7, 2017

What about dir C:\Users\fausto.braz.dnx\AppData\Roaming\npm ?

@fstbraz

This comment has been minimized.

Copy link
Author

commented Apr 7, 2017

Returns "The system cannot find the path specified."

@babilog

This comment has been minimized.

Copy link

commented Apr 7, 2017

Have you installed @angular/cli globally? Try npm install -g @angular/cli

@fstbraz

This comment has been minimized.

Copy link
Author

commented Apr 7, 2017

@babilog yes, please read my first description --> Repro steps.

@MRokas

This comment has been minimized.

Copy link

commented Apr 7, 2017

Hm.. what about dir %AppData%\npm\node_modules? -

@fstbraz

This comment has been minimized.

Copy link
Author

commented Apr 10, 2017

@MRokas the command returns:

07/04/2017 11:11

.
07/04/2017 11:11 ..
07/04/2017 10:19 @angular
07/04/2017 11:06 gulp
07/04/2017 11:11 modular
07/04/2017 09:45 typescript

@fstbraz

This comment has been minimized.

Copy link
Author

commented Apr 11, 2017

Any solution for this guys,?

Can't find anyone, to people without adiministrator access on windows ...

@MRokas

This comment has been minimized.

Copy link

commented Apr 11, 2017

From what I see, your angular-cli didn't install properly, nor you've global's in your PATH variable.
You should find where your ng file is located at, and add that location to PATH variable.

@fstbraz

This comment has been minimized.

Copy link
Author

commented Apr 11, 2017

@MRokas

In C:\Users\fausto.braz\AppData\Roaming\npm the commands are working.
cli

How can I add this to the windows PATH? (Windows noob here :D).

@fstbraz

This comment has been minimized.

Copy link
Author

commented Apr 11, 2017

So I get this working by adding to my user account enviroment PATH:

For that go to :

Control Panel > User accounts > Change my environmnet variables

and add the path to your AppData\Roaming\npm, in my case was

C:\Users\fausto.braz\AppData\Roaming\npm

@MRokas thanks for the support 👍

@filipesilva

This comment has been minimized.

Copy link
Member

commented May 4, 2017

Thanks for everyone that helped solve this, cheers!

@filipesilva filipesilva closed this May 4, 2017

@naru6be

This comment has been minimized.

Copy link

commented Jul 22, 2017

At last find the solution for ng command is not working issue ,Find the solution below http://itechiesol.blogspot.com/2017/07/angular-cli-ng-command-is-not-working.html

@ETL-Corp

This comment has been minimized.

Copy link

commented Sep 5, 2017

thanks for the clean Solution for the Issue
it been an helpfull Resource 👍

@RahulSolanki1487

This comment has been minimized.

Copy link

commented Sep 11, 2018

At last find the solution for ng command is not working issue ,Find the solution below http://itechiesol.blogspot.com/2017/07/angular-cli-ng-command-is-not-working.html

this helped me to resolve issue on windows 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.