-1

I am new to Angular as i'm trying to build one basic example but when i tried i get the issue below. Can any one help me with this i already ran an npm install and node js is already installed.

when i ran the below command in Visual Studio terminal i am getting below issue.

PS <HelloApp> ng serve ng : The term 'ng' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1
+ ng serve
+ ~~
    + CategoryInfo          : ObjectNotFound: (ng:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
James
  • 2,516
  • 2
  • 19
  • 31
Abhishek
  • 1
  • 2

2 Answers2

1

Remove ng.ps1 from the directory

C:\Users\%username%\AppData\Roaming\npm\

then try clearing the npm cache at

C:\Users\%username%\AppData\Roaming\npm-cache\
Ponsiva
  • 944
  • 4
  • 15
0

Try install angular using

npm install -g @angular/cli
Nimezzz
  • 1,814
  • 14
  • 15