hyperledger fabric devmode

牧云@^-^@ 提交于 2019-12-11 17:19:39

问题


I am trying to deploy chaincode in devmod on my ubuntu machine. I am following this tutorial.

The issue is when I use this command : CORE_CHAINCODE_LOGLEVEL=debug CORE_PEER_ADDRESS=localhost:7052 npm start

it shows the following error:

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>

Full logs can be found here: https://hastebin.com/arerozesad.sql

I am following this tutorial: https://hyperledger-fabric.readthedocs.io/en/v1.0.6/peer-chaincode-devmode.html


回答1:


First, I hope you are using Fabric v1.1 or later as Node.js chaincode is not supported in v1.0.x.

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

You should be able to replace node mycc.js with npm start as well.

See https://github.com/hyperledger/fabric-chaincode-node#test-nodejs-chaincode for more information.



来源:https://stackoverflow.com/questions/52429568/hyperledger-fabric-devmode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!