【发布时间】:2020-02-29 18:59:27
【问题描述】:
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 显示这个错误..如何克服它?
【问题讨论】:
-
Rohan 请尝试在标准 cmd 中使用 ng serve。 Powershell 与标准 cmd 非常不同。
-
标准cmd表示
-
按win标志键并输入“cmd”然后回车。 CMD 外壳将打开。那是标准的cmd。 *.ps1 文件运行到 powerShell,这是一个更复杂的 shell,我相信它不受 cli 支持。
标签: angular