首页 > 其他分享 >cannot be loaded because running scripts is disabled on this system的对策

cannot be loaded because running scripts is disabled on this system的对策

时间:2022-09-30 19:58:56浏览次数:54  
标签:because system tsc disabled running loaded

PS C:\Dev\typescript> tsc Runoob.ts
tsc : File C:\Users\myname\AppData\Roaming\npm\tsc.ps1 cannot be loaded because running s        
cripts 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
+ tsc Runoob.ts
+ ~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

  

我遇到的问题是这样的。意思是脚本不被win10允许执行,可能是因为安全性问题,所以我们要修改一下默认设置,可以执行下面命令:右键开始菜单,打开管理员的PowerShell。

执行下面的命令:

set-ExecutionPolicy RemoteSigned

  然后问题就解决了。

 

标签:because,system,tsc,disabled,running,loaded
From: https://www.cnblogs.com/wzihan/p/16745939.html

相关文章