The term 'ng' is not recognized as the name of a cmdlet

后端 未结 30 1055
灰色年华
灰色年华 2020-12-01 00:24

Today, while working through some basic AngularJS Intro, I ran into a problem.

I opened PowerShell to get going on the project. NPM worked.

I was able to in

30条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 01:05

    1)Right Clicked on My Computer (windows) 2)Selected Advanced System Settings 3)Clicked "Environment Variables" 4)Under "Path" variable, made the FIRST value listed %AppData%\npm

    Initially: C:\Program Files\Microsoft MPI\Bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;

    After path adding: C:\Program Files\Microsoft MPI\Bin\;%AppData%\npm;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;

    One more thing you can try ,if error still coming, as below 1)go to project location via command prompt:C:\Users\brijeshray\ParentChild> 2)Reinstall or update existing angular as : npm install -g@angular/cli@latest

    3)Go to computer or PC-->Properties-->Advanced system setting -->Environment Variable -->add a path below "User variable"(if 'Path' not there) ==>C:\Users\brijeshray\AppData\Roaming\npm -->save it and restart visual code

提交回复
热议问题