New Angular项目将不会运行NG命令

问题描述 投票:-2回答:1

我正在开发一个新的Angular项目,并使用以下命令安装了Angular:

npm install -g @angular/cli

之后我尝试运行此命令:

ng new my-project

我最终收到此错误:

ng : File C:\Users\Me\AppData\Roaming\npm\ng.ps1 cannot be loaded because running scripts is disabled on this system. For more information, 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命令。我该如何解决?

angular command-line-interface
1个回答
-1
投票

这在Visual Studio Code的终端中发生。

© www.soinside.com 2019 - 2024. All rights reserved.