【问题标题】:composer runtime install command not recognized作曲家运行时安装命令无法识别
【发布时间】:2018-04-26 18:30:28
【问题描述】:

我正在尝试使用 composer runtime install 命令在我的本地超级账本结构上安装结构 Composer 运行时,但“运行时”未被识别为命令。

$ composer runtime install -n manuf-network -c PeerAdmin@hlfv1

Commands:
  archive <subcommand>      Composer archive command
  generator <subcommand>    Composer generator command to convert a Business Network Definition to code
  identity <subcommand>     Composer identity command
  network <subcommand>      Composer network command
  participant <subcommand>  Composer participant command
  transaction <subcommand>  Composer transaction command
  shell                     Interactive shell  [aliases: shell, i]

Options:
  --help         Show help  [boolean]
  -v, --version  Show version number  [boolean]

Examples:
  composer archive create --inputDir .
  composer identity issue
  composer network deploy
  composer participant add
  composer transaction submit

For more information on Hyperledger Composer: https://hyperledger.github.io/composer/

Unknown arguments: n, c, runtime, install

我已将 composer-cli 作为全局安装。
这是版本:

$ composer --version

composer-cli                   v0.8.1
composer-admin                 v0.8.1
composer-client                v0.8.1
composer-common                v0.8.1
composer-runtime-hlf           v0.8.1
composer-runtime-hlfv1         v0.8.1

我已经卸载并重新安装了 composer-cli (npm uninstall/install -g composer-cli),但仍然无法让它识别运行时安装命令。
我看到 composer 的最新版本是 15,但我的系统只能识别 8.1(见上文)。

作为https://hyperledger.github.io/composer/installing/development-tools.html 安装开发环境步骤的一部分,我安装了 nvm 并且想知道这是否与问题有关。

【问题讨论】:

  • 祝你好运,我面临同样的问题。

标签: hyperledger-fabric hyperledger-composer


【解决方案1】:

问题在于 composer 安装在多个位置 - (它在最近安装 nvm 之前安装为 8.1 版本,并且安装为安装 nvm 之后的最新版本)。为了解决这个问题,我找到并删除了所有 composer 实例(从 .npm 和 .nvm 中,除了我在 nvm 中使用的特定版本的节点)。

【讨论】:

  • 缺少“运行时安装”选项的问题是因为 Hyperledger Composer 从 v0.10.0 开始引入了这个 - 请参阅当时的发行说明 - github.com/hyperledger/composer/releases/tag/v0.10.0。您使用的是什么操作系统?看起来像“Linux”,但如果您查看先决条件hyperledger.github.io/composer/installing/…,您会具体看到最低要求 - NVM 本身不会成为问题,但您清理环境是正确的。从 v0.15.0 开始有很大的变化,你应该使用它。 v0.8.1 已经过时了。
【解决方案2】:

在较新版本的 Composer 中,“runtime install”命令已更改为“network install”,不再需要 --businessNetworkName 参数。这个命令应该可以工作:

$ composer network install -a your-bna-file.bna -c PeerAdmin@hlfv1

在此处查看有关官方文档的更多信息: Hyperledger Composer Network Install

【讨论】:

    猜你喜欢
    • 2015-10-23
    • 2017-08-13
    • 2014-10-12
    • 2018-05-18
    • 2017-05-31
    • 2016-04-29
    • 2021-03-08
    • 1970-01-01
    • 2023-03-03
    相关资源
    最近更新 更多