This article is a mirror article of machine translation, please click here to jump to the original article.

View: 20827|Reply: 0

[Angular] ng : File C:\itsvse\npm\ng.ps1 cannot be loaded because running scripts...

[Copy link]
Posted on 5/22/2020 10:35:47 AM | | |
Using the ng serve command, the error is as follows:

ng : File C:\itsvse\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 s
+ ~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Solution:

Switch to the cmd console and execute the command again.

Other solutions:

1. Windos PowerShell runs as administrator

2. set-ExecutionPolicy RemoteSigned and then change the permission to A

3. get-ExecutionPolicy to view the current status




Previous:JS amounts are separated by thousand commas
Next:Could not load file or assembly 'Microsoft.Practices.Unity.Configuration'
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com