在当前目录中找不到 composer.json
No composer.json found in the current directory
大家好,如果这有一个基本的答案,我真的很抱歉,因为我对此很陌生。我正在关注 YouTube 教程 Hyperledger Composer 开发教程 (2/5) - 建模语言 (Mac OS X) https://www.youtube.com/watch?v=S2S5cEcmx7Q&t=100s.
按照 3:22 之前的所有步骤(以及教程 1/5),我尝试命令:
composer archive create -a /dist/perishables.bna --sourceType dir --sourceName
结果应该是:
Creating Business Network Archive
Looking for package.json of Business Network Definition
Input directory: /Users/joeheade/composer-sample-networks/packages/perishable-network
Found:
Description: Shipping Perishable Goods Business Network
Name: perishable-network
Identifier: perishable-network@0.1.11
Written Business Network Definition Archive file to
Output file: ./dist/perishable-network.bna
Command succeeded
当我尝试时,我得到了这个:
Joe-Heades-MBP:perishable-network joeheade$ composer archive create -a /dist/perishables.bna --sourceType dir --sourceName
[Symfony\Component\Console\Exception\RuntimeException]
The "-a" option does not exist.
archive [-f|--format FORMAT] [--dir DIR] [--file FILE] [--ignore-filters] [--] [<package>] [<version>]
如果我检查版本我得到这个:
Joe-Heades-MBP:perishable-network joeheade$ composer --version
Composer version 1.5.5 2017-12-01 14:42:57
对于通用命令,我得到这个:
Joe-Heades-MBP:perishable-network joeheade$ composer archive create
Searching for the specified package.
No composer.json found in the current directory, searching packages from packagist.org
Could not find a package matching create.
有人能帮忙吗?如果我不正确地遵循任何 Stack Overflow 规则,我也很抱歉;这是我的第一个 post.
提前致谢!
更新:此外,如果我后退一步,我会得到以下结果:
Joe-Heades-MacBook-Pro:dist joeheade$ compose archive create -a dist/perishables.bna --sourceType dir --sourceName
-bash: compose: command not found
按照步骤 https://github.com/composer/composer/issues/6303,我也得到以下响应:
Joe-Heades-MacBook-Pro:perishable-network joeheade$ composer update
Composer could not find a composer.json file in /Users/joeheade/composer-sample-networks/packages/perishable-network
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
您在此命令中遗漏了一个小点 (.)。
在执行此命令之前,请确保您在此目录文件夹中有 dist
。
composer archive create --sourceType dir --sourceName . -a ./dist/perishables.bna
使用此命令创建 .bna(商业网络存档)文件。这应该 return 预期值。
您还没有安装 Hyperledger Composer。您已经安装了另一个名为 composer 的东西,它的命令行名称也为 composer
。
请参阅文档网站 https://hyperledger.github.io/composer/ 了解有关 Hyperledger Composer 的信息,并确保卸载 php 的依赖管理器(称为 composer)。
大家好,如果这有一个基本的答案,我真的很抱歉,因为我对此很陌生。我正在关注 YouTube 教程 Hyperledger Composer 开发教程 (2/5) - 建模语言 (Mac OS X) https://www.youtube.com/watch?v=S2S5cEcmx7Q&t=100s.
按照 3:22 之前的所有步骤(以及教程 1/5),我尝试命令:
composer archive create -a /dist/perishables.bna --sourceType dir --sourceName
结果应该是:
Creating Business Network Archive
Looking for package.json of Business Network Definition
Input directory: /Users/joeheade/composer-sample-networks/packages/perishable-network
Found:
Description: Shipping Perishable Goods Business Network
Name: perishable-network
Identifier: perishable-network@0.1.11
Written Business Network Definition Archive file to
Output file: ./dist/perishable-network.bna
Command succeeded
当我尝试时,我得到了这个:
Joe-Heades-MBP:perishable-network joeheade$ composer archive create -a /dist/perishables.bna --sourceType dir --sourceName
[Symfony\Component\Console\Exception\RuntimeException]
The "-a" option does not exist.
archive [-f|--format FORMAT] [--dir DIR] [--file FILE] [--ignore-filters] [--] [<package>] [<version>]
如果我检查版本我得到这个:
Joe-Heades-MBP:perishable-network joeheade$ composer --version
Composer version 1.5.5 2017-12-01 14:42:57
对于通用命令,我得到这个:
Joe-Heades-MBP:perishable-network joeheade$ composer archive create
Searching for the specified package.
No composer.json found in the current directory, searching packages from packagist.org
Could not find a package matching create.
有人能帮忙吗?如果我不正确地遵循任何 Stack Overflow 规则,我也很抱歉;这是我的第一个 post.
提前致谢!
更新:此外,如果我后退一步,我会得到以下结果:
Joe-Heades-MacBook-Pro:dist joeheade$ compose archive create -a dist/perishables.bna --sourceType dir --sourceName
-bash: compose: command not found
按照步骤 https://github.com/composer/composer/issues/6303,我也得到以下响应:
Joe-Heades-MacBook-Pro:perishable-network joeheade$ composer update
Composer could not find a composer.json file in /Users/joeheade/composer-sample-networks/packages/perishable-network
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
您在此命令中遗漏了一个小点 (.)。
在执行此命令之前,请确保您在此目录文件夹中有 dist
。
composer archive create --sourceType dir --sourceName . -a ./dist/perishables.bna
使用此命令创建 .bna(商业网络存档)文件。这应该 return 预期值。
您还没有安装 Hyperledger Composer。您已经安装了另一个名为 composer 的东西,它的命令行名称也为 composer
。
请参阅文档网站 https://hyperledger.github.io/composer/ 了解有关 Hyperledger Composer 的信息,并确保卸载 php 的依赖管理器(称为 composer)。