在此处关注开发人员教程时:
https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial.html
一切顺利,直到“ Step Five: Generating a REST server ”
我收到以下消息:
$ composer-rest-server
?输入要使用的业务网卡的名称: admin@my-test-network
?指定是否需要在生成的REST API中使用名称空间: never use namespaces
?指定是否要使用Passport为REST API启用身份验证: No
?指定是否要通过WebSockets启用事件发布: Yes
?指定是否要为REST API启用TLS安全性: No
要使用相同的选项重新启动REST服务器,请发出以下命令:composer-rest-server -c admin @ my-test-network -n never -w true
从业务网络定义中发现类型... Connection fails: Error: Error trying to ping. Error: Composer runtime (0.19.0) is not compatible with client (0.18.2) 将针对下一个请求重试 . 例外:错误:尝试ping时出错 . 错误: Composer runtime (0.19.0) is not compatible with client (0.18.2) 错误:尝试ping时出错 . 错误:在_checkRuntimeVersions.then.catch(/home/james/.nvm/versions/node/v8.11.1/lib/node_modules/composer-rest-)中,Composer运行时(0.19.0)与客户端(0.18.2)不兼容server / node_modules / composer-connector-hlfv1 / lib / hlfconnection.js:780:34)at
我已经遇到过以前安装步骤的问题,这些问题已在此处解决hyperledger composer installation issue
但似乎仍然有一些(客户端)组件使用0.18.2而不是0.19.0 .
有人可以帮忙吗?谢谢 .
1 回答
以下解决了这个问题:
npm install -g composer-rest-server@0.19.0