繁体   English   中英

松露已安装但无法正常工作

[英]Truffle installed but not working properly

我正在使用节点版本 12.20.2 和 npm 版本 6.14.11 并以 cmd 作为管理员安装松露,松露框架版本 5.5.12 已经安装但是当我在 vs 代码中运行任何命令时,它会弹出错误

PS E:\Testing (roughf work)> truffle version
truffle : File C:\Program Files\nodejs\truffle.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
+ truffle version
+ ~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
PS E:\Testing (roughf work)> truffle init
truffle : File C:\Program Files\nodejs\truffle.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
+ truffle init
+ ~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

我不知道该怎么办

在 truffle quickstart 上,它声明使用 nvm ,因为会发生这样的权限错误。 但是,要解决此错误,您还可以使用此 powershell 命令Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM