Search code examples
angularnpmangular-cli

Angular Cli does nor working after reinstalling it


I wanted to uprade my Angular Cli by removing it and instaling the new version, now i cant run ng commands anymore ,there is always this error Message: ng : File C:\Users\Sirius\AppData\Roaming\npm\ng.ps1 cannot be loaded. The file C:\Users\Sirius\AppData\Roaming\npm\ng.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1

  • ng serve --open
  • ~~
    • CategoryInfo : SecurityError: (:) [], PSSecurityException
    • FullyQualifiedErrorId : UnauthorizedAccess

i uninstalled the angular cli another time and reinstalled it(it doesnt worked out)


Solution

  • This is a common, issue. You can either try to fully clean your cli install : https://stackoverflow.com/a/58044573/10458514

    Or execute a PS command to authorize the execution of ng command : https://www.thecodebuzz.com/angular-powershell-ng-ps1-can-not-be-loaded-and-not-digitally-signed/