1

I"m doing this tutorial for Azure. It's when I come to running the following

ng new angular-cosmosdb -sd src/client --minimal --style scss

I get the error message "'ng' is not recognized as an internal or external command," when I can confirm that Angular has been installed globally - as below

I've tried solutions here,

'ng' is not recognized as an internal or external command

namely

o reinstall the angular with -g argument (even though this was already installed globally) o restart, restart, restart laptop again and again and again o my suspicion is that an local variable might need to be set? But other than that..

output from the list command is:

C:\2017\12 December\04122017\project>npm list -g --depth=0
D:\Users\useradmin\AppData\Roaming\npm
+-- @angular/cli@1.5.5
`-- typescript@2.6.2
Nick Orlando
  • 484
  • 1
  • 5
  • 17
Nimbocrux
  • 509
  • 2
  • 10
  • 27

1 Answers1

2

If you are experiencing this in Windows, Try setting the PATH as,

set PATH=%PATH%;C:\Users\[YOUR_WINDOWS_USER_NAME\AppData\Roaming\npm;

In case if you are using it in OSX,

export PATH=/usr/local/share/npm/bin:$PATH

which will make the ng command work.

David R
  • 14,711
  • 7
  • 54
  • 72