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
This powershell script worked to add the correct setting to my Environment Variable "Path" ( As a per-user setting. ) It adds: %AppData%\npm ...and then restart the command line that uses "ng"
$existingPath = [System.Environment]::GetEnvironmentVariable("Path","User")
write-host "existing PATH variable is $existingPath"
$newPath = "%AppData%\npm;$existingPath"
write-host "new PATH will be $newPath"
# update here
[System.Environment]::SetEnvironmentVariable("Path", $newPath, "User")
$finalPath = [System.Environment]::GetEnvironmentVariable("Path","User")
write-host "final PATH variable is $finalPath"