首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >已安装但不能工作

已安装但不能工作
EN

Ethereum用户
提问于 2022-04-30 05:01:50
回答 1查看 200关注 0票数 1

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

代码语言:javascript
复制
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

我不知道该怎么办,请尽快帮我

EN

回答 1

Ethereum用户

发布于 2022-10-29 12:31:08

临时解决方案.

npx松露版本

npx松露

永久解决方案的

:

以下任何一种解决办法都将解决这一问题:

  1. 使用.cmd扩展显式调用可执行文件(truffle.cmd编译)
  2. 编辑system环境变量并从可执行扩展列表中删除.JS;
  3. 将truffle.js重命名为其他东西(块菌-config.js)
  4. 使用Windows或Git,因为这些PowerShell没有这种冲突。

我建议的解决方案:使用CMD

来源

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/127218

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档