IBM-Blockchain-Archive / ibm-blockchain-issues

Having issues with the IBM Blockchain Bluemix service? Let us know!
13 stars 12 forks source link

How to deploy GO chaincode which uses other libraries? #121

Open jonathan-yk-tan opened 6 years ago

jonathan-yk-tan commented 6 years ago

Using the Blockchain Enterprise Plan on Bluemix, we have successfully created a new channel and added peers, however when trying to deploy GO chaincode which uses third-party libraries, we are getting the error:

"Error: /opt/go/src/github.com/xeipuuv/gojsonschema (from $GOROOT) /chaincode/input/src/github.com/xeipuuv/gojsonschema (from $GOPATH) /opt/gopath/src/github.com/xeipuuv/gojsonschema "

Does the Enterprise plan support any GO package manager like Govend?

If not, what is the directory structure to upload the dependencies together with the chaincode zip?

mastersingh24 commented 6 years ago

@jonathan-yk-tan - You need to use a tool like govendor to vendor any dependencies which are not part of the Go std library into your chaincode package