简体   繁体   English

Hyperledger Fabric installChaincode错误安装链码请求中缺少对等对象

[英]Hyperledger Fabric installChaincode error Missing peer objects in install chaincode request

I'm trying to install a chaincode to a blockchain environment by using the installChaincode hyperledger fabric node sdk function via a node bridge. 我正在尝试通过节点桥使用installChaincode hyperledger fabric节点sdk函数将链码安装到区块链环境中。 The way I'm calling the function is as follows : 我调用该函数的方式如下:

let fabricClient = new FabricClient();
...
let request = {
                targets: ['peer0-Org1'],
                chaincodePath: '[path_to_chaincode]',
                chaincodeId: 'abcd',
                chaincodeVersion: 'v1.0',
            }


let result = await fabricClient.installChaincode({
                request: request,
                timeout: 5000
            });

However, I'm getting an error that says I am Missing peer objects in install chaincode request . 但是,出现一个错误,提示我Missing peer objects in install chaincode request

The full error message is: error: [Client.js]: installChaincode error Missing peer objects in install chaincode request 完整的错误消息是: error: [Client.js]: installChaincode error Missing peer objects in install chaincode request

What could I've missed in setting up the request object? 在设置请求对象时我可能会错过什么?

显然我在调用该函数错误,

let result = await fabricClient.installChaincode(request, 5000);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM