gpt4 book ai didi

angular - 提供 ng serve 时出现 CLI 错误

转载 作者:行者123 更新时间:2023-12-04 12:17:05 24 4
gpt4 key购买 nike

ng : File C:\Users\Lenovo\AppData\Roaming\npm\ng.ps1 cannot be loaded. The file C:\Users\Lenovo\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
+ ~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess

在给 ng serve 显示此错误的同时..如何克服它?

最佳答案

从同一终端或命令提示符运行以下命令,然后重新运行 ng 命令以检查它是否在您的机器上运行。

命令是---------Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

关于angular - 提供 ng serve 时出现 CLI 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58693796/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com