英文:
Angular Cli does nor working after reinstalling it
问题
我想升级我的Angular Cli,通过删除它并安装新版本,现在我无法运行ng命令,总是出现以下错误信息:
ng : 无法加载文件 C:\Users\Sirius\AppData\Roaming\npm\ng.ps1。文件 C:\Users\Sirius\AppData\Roaming\npm\ng.ps1 未经数字签名。您无法在当前系统上运行此脚本。有关运行脚本和设置执行策略的更多信息,请参阅 about_Execution_Policies,网址为 https:/go.microsoft.com/fwlink/?LinkID=135170。
At line:1 char:1
- ng serve --open
- ~~
- CategoryInfo : SecurityError: (:) [], PSSecurityException
- FullyQualifiedErrorId : UnauthorizedAccess
我再次卸载了Angular Cli并重新安装它(但没有成功)。
英文:
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)
答案1
得分: 0
这是一个常见的问题。你可以尝试完全清理你的命令行安装:https://stackoverflow.com/a/58044573/10458514
或者执行一个 PowerShell 命令来授权执行 ng 命令:https://www.thecodebuzz.com/angular-powershell-ng-ps1-can-not-be-loaded-and-not-digitally-signed/
英文:
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/
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论