truffle安装问题-无法加载文件 C:\Users .... 因为在此系统上禁止运行脚本。有关详细信息,请参阅 http s:/go.microsoft.com/fwlink/?LinkID=135170

在 vscode 的 powershell 终端运行 truffle 命令失败

 

 

 即以下信息

truffle : 无法加载文件 C:\Users\xxxx\AppData\Roaming\npm\truf
fle.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 http
s:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution
_Policies。
所在位置 行:1 字符: 1
+ truffle
+ ~~~~~~~
    + CategoryInfo          : SecurityError: (:) [],PSSecurit
    yException
    + FullyQualifiedErrorId : UnauthorizedAccess

 

在开始菜单查找 powershell

 

输入

set-executionpolicy remotesigned

 

 解决

 

posted @ 2022-03-06 22:45  apeNote  阅读(844)  评论(0编辑  收藏  举报