chainHero / heroes-service

Short tutorial to build a blockchain application in Go with Hyperledger Fabric
https://chainhero.io/2018/06/tutorial-build-blockchain-app-v1-1-0/
Apache License 2.0
275 stars 147 forks source link

compilation issue Fabric SDK Go at the Test Step #13

Closed M-AMAIRI closed 6 years ago

M-AMAIRI commented 6 years ago

Hi ,

I followed the tutorial, and I installed Version Go 1.10, but I have some problem of compilation, in my opinion because of a missing library , despite I have succeeded in all precedent steps . here is the echo when launching build

cd $GOPATH/src/github.com/chainHero/heroes-service && go build
main.go:6:2: cannot find package "github.com/chainHero/heroes-service/web" in any of:
    /home/m-amairi/go/src/github.com/chainHero/heroes-service/vendor/github.com/chainHero/heroes-service/web (vendor tree)
    /usr/local/go/src/github.com/chainHero/heroes-service/web (from $GOROOT)
    /home/m-amairi/go/src/github.com/chainHero/heroes-service/web (from $GOPATH)
main.go:7:2: cannot find package "github.com/chainHero/heroes-service/web/controllers" in any of:
    /home/m-amairi/go/src/github.com/chainHero/heroes-service/vendor/github.com/chainHero/heroes-service/web/controllers (vendor tree)
    /usr/local/go/src/github.com/chainHero/heroes-service/web/controllers (from $GOROOT)
    /home/m-amairi/go/src/github.com/chainHero/heroes-service/web/controllers (from $GOPATH)

can someone help me please , thanks , Moatez

sshmaxime commented 6 years ago

Hi @M-AMAIRI !

It's not a problem of dependencies but a problem with your files. The error is saying that you don't have the web files in your directory.

Can you tell me where did this issue came ? At which point of the tutorial ?

antitoine commented 6 years ago

@M-AMAIRI , You must have copied the Gopkg.lock file in addition to the Gopkg.toml. Remove the Gopkg.lock file, run the dependency manager and compile again:

cd $GOPATH/src/github.com/chainHero/heroes-service
rm -f Gopkg.lock
dep ensure
go build
antitoine commented 6 years ago

I close this issue as there was no update.

M-AMAIRI commented 6 years ago

Hi @antitoine , thank you for help , Sorry for the Late Reply I have been sick since last week , I followed the steps that you mentioned, and currently it works for me , and as @MaximeAubanel said , this type of errors can be also by the lack of web/controllers files .

Thanks , Moatez ,