How to set chaincode path in Hyperledger Fabric?

0 votes

I am trying to install chaincode on Hyperledger Fabric to run a script on my local machine.

I am running the following command for it:

peer chaincode install -n mycc -v 1.0 -p ./bitbucket.org/Foldername/testBlockchain/folder_name_for_chaincode

When I execute it, I get error telling that chaincode path does not exist. How to properly set the chaincode path?

Jul 27, 2018 in Blockchain by slayer
• 29,050 points
460 views

1 answer to this question.

0 votes

For chaincode to properly run on your system, you need to have chaincode defined in your GOPATH. T0 do this, move your chaincode to $GOPATH/src folder.

Then run the following command:

peer chaincode install -n mycc -v 1.0 -p bitbucket.org/Foldername/testBlockchain/folder_name_for_chaincode

This should work.

answered Jul 27, 2018 by digger
• 27,630 points

Related Questions In Blockchain

0 votes
0 answers
+1 vote
0 answers
+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 17,010 points
764 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to control visibility of assets in Hyperledger Fabric?

you can use proof of Authority consensus ...READ MORE

answered Jul 10, 2018 in Blockchain by digger
• 27,630 points
96 views