[英]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.