【问题标题】:error in ganache installation: The term 'ganache-cli' is not recognized as the name of a cmdlet, function, script file, or operable programganache 安装错误:术语“ganache-cli”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称
【发布时间】:2021-11-13 02:18:56
【问题描述】:

我使用 yarn 安装了 ganache,但是当我检查版本以查看是否正确安装时,我收到错误消息:“术语 'ganache-cli' 无法识别为 cmdlet、函数、脚本文件或可运行的程序”。

【问题讨论】:

  • 通过不使用 yarn 进行安装解决了这个问题,但是:$ npm install -g ganache-cli

标签: blockchain ganache


【解决方案1】:

即使在使用以下命令安装后,您也可能会遇到同样的问题。

npm install -g ganache-cli

在这种情况下,请检查您在环境变量中的路径是否设置正确或丢失。

环境变量->系统变量->路径

应该是这样的

%UserProfile%\AppData\Roaming\npm

此外,一旦设置完毕,请关闭您的 cmd 或终端并尝试在新的终端实例中运行 Ganache-cli 命令。

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,但后来我用 npm 安装了它并且它工作了

    npm install -g ganache-cli
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-01
      • 2021-05-23
      • 2020-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多