I am new to hyperledger fabric. I have downloaded the fabric v1.2.0 and I tried to run fabcar example from the fabric-sample folder. My querying on the chaincode went well, but when I tried to invoke the chaincode I got the below error from the cmd.
This is my request to the chaincode
var request = {
//targets: let default to the peer assigned to the client
chaincodeId: 'fabcar',
fcn: 'changeCarOwner',
args: ['CAR4', 'Dave'],
chainId: 'mychannel',
txId: tx_id
};
Error:
Failed to invoke successfully :: TypeError: fabric_client.newEventHub is not a function
When I tried to find newEventHub in index.t.ds, I could not find the function. Can anyone help me with this.Thanks in advance.