You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ng-cli appears to install but does not run on Windows 10 #17071
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
When trying to run the command "ng new my-app" i get this error message:
'ng' is not recognized as an internal or external command, operable program or batch file.
This is also reported by lots of others apparently having the same issue.
Expected behavior
The command "ng new my-app" should execute without any errors.
Hi Olivier,
I'm just using npm on Windows 10.
Today i uninstalled node restarted and 7.10.0 and restarted it.
But i still get *'ng' is not recognized as an internal or external command,
operable program or batch file.*
Best Regards
Ulrik Sorber
I just responded to the same issue under angular/angular-cli [(https://github.com/angular/angular-cli/issues/6501)]
with the following comment.
For Windows 10 users only
You can not install ng from the command line with a non administrator account
And there is no sudo. Only runas which runs as the administrator with the administrator profile.
The UAC does not kick in and ask you to provide admin permissions as when you run an installer.
So the ng binary will be located in the Administrator npm folder after installing using the runas feature.
Take a look at the folder "C:\Users\Administrator\AppData\Roaming\npm" and see if you can spot ng.
If you can then add "C:\Users\Administrator\AppData\Roaming\npm" to your path.
There is something called sudo for windows ( https://sourceforge.net/projects/sudowin/ )
It runs with elevated permissions, while preserving your profiling settings.
I haven't tried it. Use at own risk.
I faced the same issue after installing angular cli with npm install -g @angular/cli command on windows 10.
Then I applied the solution offered by MrRhino and it worked.
Take a look at the folder "C:\Users\your-user-folder\AppData\Roaming\npm" and see if you can spot ng. If you can, then add "C:\Users\your-user-folder\AppData\Roaming\npm" to your path.
If you have any cmd open then close them and then re-open a cmd and try with ng command.
Hope this helps someone.
angular-automatic-lock-bot commented on Sep 14, 2019
Activity
jotatoledo commentedon May 28, 2017
The issue tracker for @angular/cli is here. Consider moving the issue to the right repo
jotatoledo commentedon May 28, 2017
How did u installed the cli?
npm install -g @angular/cliornpm install @angular/cli?MrRhino commentedon May 29, 2017
ocombe commentedon May 29, 2017
you can have this problem if you install it with both yarn & npm, uninstall in both and reinstall only with npm (if that was the case)
MrRhino commentedon May 29, 2017
MrRhino commentedon May 29, 2017
I just responded to the same issue under angular/angular-cli [(https://github.com/angular/angular-cli/issues/6501)]
with the following comment.
For Windows 10 users only
You can not install ng from the command line with a non administrator account
And there is no sudo. Only runas which runs as the administrator with the administrator profile.
The UAC does not kick in and ask you to provide admin permissions as when you run an installer.
So the ng binary will be located in the Administrator npm folder after installing using the runas feature.
Take a look at the folder "C:\Users\Administrator\AppData\Roaming\npm" and see if you can spot ng.
If you can then add "C:\Users\Administrator\AppData\Roaming\npm" to your path.
There is something called sudo for windows ( https://sourceforge.net/projects/sudowin/ )
It runs with elevated permissions, while preserving your profiling settings.
I haven't tried it. Use at own risk.
usernamealreadyis commentedon May 29, 2017
#17071
saharpure commentedon May 9, 2018
any resolution on this issue? getting same problem on Windows 10, after running
npm install @angular/cli -ggetting ng not recognized.skm2017 commentedon Dec 23, 2018
I faced the same issue after installing angular cli with
npm install -g @angular/clicommand on windows 10.Then I applied the solution offered by MrRhino and it worked.
If you have any cmd open then close them and then re-open a cmd and try with
ngcommand.Hope this helps someone.
angular-automatic-lock-bot commentedon Sep 14, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.