Reputation: 51
How can solve this?
C:\Users\User\AppData\Roaming\npm\sanity.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
+ CategoryInfo : SecurityError: (:) [],
PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Upvotes: 0
Views: 3131
Reputation: 373
Check for Get-ExecutionPolicy
if it is like "AllSigned, Bypass, Default, Restricted, Undefined"
then execute the below command in PowerShell Administrator mode. You can also use RemoteSigned, Unrestricted
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Upvotes: 1