超账结构开发模式 [英] hyperledger fabric devmode
问题描述
我正在尝试在Ubuntu计算机上的devmod中部署chaincode.我正在关注本教程.
I am trying to deploy chaincode in devmod on my ubuntu machine. I am following this tutorial.
问题是当我使用以下命令时:CORE_CHAINCODE_LOGLEVEL=debug CORE_PEER_ADDRESS=localhost:7052 npm start
The issue is when I use this command : CORE_CHAINCODE_LOGLEVEL=debug CORE_PEER_ADDRESS=localhost:7052 npm start
它显示以下错误:
2018-09-20T16:27:18.292Z ERROR [lib/handler.js] uncaughtException: The "peer.address" program argument must be set to a legitimate value of <host>:<port>
完整的日志可以在这里找到: https://hastebin.com/arerozesad.sql
Full logs can be found here: https://hastebin.com/arerozesad.sql
我正在关注本教程: https://hyperledger-fabric.readthedocs.io/zh/v1.0.6/peer-chaincode-devmode.html
I am following this tutorial: https://hyperledger-fabric.readthedocs.io/en/v1.0.6/peer-chaincode-devmode.html
推荐答案
首先,我希望您使用的是Fabric v1.1或更高版本,因为v1.0.x不支持Node.js链码.
First, I hope you are using Fabric v1.1 or later as Node.js chaincode is not supported in v1.0.x.
您列出的说明用于运行Go链码. 对于Node.js链码,您的命令应类似于
The instructions you listed are for running Go chaincode. For Node.js chaincode, your command should look like
CORE_CHAINCODE_ID_NAME="mycc:v0" node mycc.js --peer.address grpc://localhost:7052
您还应该能够将node mycc.js
替换为npm start
.
You should be able to replace node mycc.js
with npm start
as well.
请参见 https://github.com/hyperledger/fabric- chaincode-node#test-nodejs-chaincode 了解更多信息.
这篇关于超账结构开发模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!