hyperledger fabric: can't find package: github.com/pkg/errors in GOPATH or GOROOT

+1 vote
chaincode_example02.go:44:2: cannot find package "github.com/pkg/errors" in any of:
        /opt/go/src/github.com/pkg/errors (from $GOROOT)
        /opt/gopath/src/github.com/pkg/errors (from $GOPATH)

I have included own functions to chaincode example, want to deploy with docker developed mode. But have this error. I am confused where I shoud put the package pkg/errors.

I have made go get github.com/pkg/errors. Still can not find while building chaincode.

Aug 3 in Blockchain by aiga

1 answer to this question.

+1 vote

Hey @aiga, try to add the package by cloning it. Follow these steps:

$ cd $GOPATH/src/github.com
$ mkdir hyperledger
$ cd hyperledger
$ git clone http://github.com/pkg/errors.git
answered Aug 5 by Esha

Related Questions In Blockchain

+15 votes
5 answers
0 votes
1 answer
0 votes
0 answers

Hyperledger Fabric: Errors in Deliver and Broadcast services

Hello, I have create successfully a multi-org, ...READ MORE

Feb 22 in Blockchain by Cha
+4 votes
2 answers

How do I create a new block in Hyperledger Fabric?

This link might help you: https://github.com/hyperledger/fabric-sample ...READ MORE

answered Oct 11, 2018 in Blockchain by Sahu
0 votes
1 answer
+1 vote
4 answers
+1 vote
2 answers
+1 vote
4 answers

What role does Orderer peer serves in Hyperledger Fabric??

Shared communication channel to clients and peers ...READ MORE

answered Apr 11, 2018 in Blockchain by Johnathon
• 9,080 points