我正在尝试运行composer-sample-applicaions(数字属性),但当我尝试运行npm test时,它会抛出错误:Composer runtime (0.18.2) is not compatible with the client (0.17.6)
以下是完整的日志:
paradox@labrats:~/hyperledger/composer/github/composer-sample-applications/packages/digitalproperty-app$ npm test
> digitalproperty-app@0.0.7 test /home/paradox/hyperledger/composer/github/composer-sample-applications/packages/digitalproperty-app
> npm run bootstrapAssets && npm run listAssets && npm run submitTransaction
> digitalproperty-app@0.0.7 bootstrapAssets /home/paradox/hyperledger/composer/github/composer-sample-applications/packages/digitalproperty-app
> node cli.js landregistry bootstrap
info: [DigitalProperty-App] Hyperledger Composer: Digital Property console application
info: [DigitalProperty-App] Adding default land titles to the asset registry
error: [DigitalProperty-App] Error: Error trying to ping. Error: Composer runtime (0.18.2) is not compatible with client (0.17.6)
Command failed.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! digitalproperty-app@0.0.7 bootstrapAssets: `node cli.js landregistry bootstrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the digitalproperty-app@0.0.7 bootstrapAssets script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/paradox/.npm/_logs/2018-03-26T09_35_58_193Z-debug.log
npm ERR! Test failed. See above for more details.
paradox@labrats:~/hyperledger/composer/github/composer-sample-applications/packages/digitalproperty-app$
任何领导都将不胜感激
答案 0 :(得分:1)
运行时指的是与您的网络安装在Peer上的Composer版本 - 如果执行docker ps -a
,您会看到这个,并且您将看到一个名为dev-peer0.org1.example.com-animaltracking-network-0.16.6...
的容器这显示了Composer运行时版本和网络名称。
您有几个选择:
不同版本的Composer需要不同版本的Fabric - 请查看本文档,其中包含Composer及其支持的Fabric版本的发布。
答案 1 :(得分:-1)
Composer运行时和客户端必须在同一版本上。 解决此问题的最佳方法,按顺序执行以下命令。