whyrusleeping / gx

A package management tool
MIT License
1.88k stars 110 forks source link

gx failing to install child dependencies #148

Open iain17 opened 6 years ago

iain17 commented 6 years ago

I've updated to the latest gx version and now all of a sudden it won't install packages child dependencies.

The commands I'm running:

gx init
#add ipfs
gx import QmNUKMfTHQQpEwE8bUdv5qmKC3ymdW7zw82LFS8D6MQXmu
#Any code that just includes the IPFS code base
go run main.go

And you end up with:

app/ipfs/bitswap.go:5:2: cannot find package "gx/ipfs/QmNUKMfTHQQpEwE8bUdv5qmKC3ymdW7zw82LFS8D6MQXmu/go-ipfs/core" in any of:
        /go/src/github.com/iain17/decentralizer/vendor/gx/ipfs/QmNUKMfTHQQpEwE8bUdv5qmKC3ymdW7zw82LFS8D6MQXmu/go-ipfs/core (vendor tree)
        /usr/local/go/src/gx/ipfs/QmNUKMfTHQQpEwE8bUdv5qmKC3ymdW7zw82LFS8D6MQXmu/go-ipfs/core (from $GOROOT)
        /go/src/gx/ipfs/QmNUKMfTHQQpEwE8bUdv5qmKC3ymdW7zw82LFS8D6MQXmu/go-ipfs/core (from $GOPATH)
app/peerfilestorage.go:4:2: cannot find package "gx/ipfs/QmNUKMfTHQQpEwE8bUdv5qmKC3ymdW7zw82LFS8D6MQXmu/go-ipfs/core/coreapi" in any of:
        /go/src/github.com/iain17/decentralizer/vendor/gx/ipfs/QmNUKMfTHQQpEwE8bUdv5qmKC3ymdW7zw82LFS8D6MQXmu/go-ipfs/core/coreapi (vendor tree)
        /usr/local/go/src/gx/ipfs/QmNUKMfTHQQpEwE8bUdv5qmKC3ymdW7zw82LFS8D6MQXmu/go-ipfs/core/coreapi (from $GOROOT)
        /go/src/gx/ipfs/QmNUKMfTHQQpEwE8bUdv5qmKC3ymdW7zw82LFS8D6MQXmu/go-ipfs/core/coreapi (from $GOPATH)

even tried doing another: gx install - seems to install everything, but it just doesn't.

I see the packages are now installed in the vendor directory. Has anything else changed that might've broken gx?

whyrusleeping commented 6 years ago

The issue here is probably that you don't have gx-go installed, and its needed for working with go-ipfs

fiatjaf commented 6 years ago

I get the same outputs, and I do have gx-go installed. I've also set my language on package.json to "go" (also tried "Go").

fiatjaf@luke ~/c/test [1]> gx install
[done] [install] xstrings                      QmSqo5o4gA8Jnd1UvbXKpQ6toDNUDt4a4xtzUmu1ZPieaa 0s
fiatjaf@luke ~/c/test> go run main.go 
main.go:5:5: cannot find package "gx/ipfs/QmV58SA4ZdqFkdJXbbFBGWhdCCMCk8QQdtvsVJxYN2rN8A" in any of:
    /usr/local/go/src/gx/ipfs/QmV58SA4ZdqFkdJXbbFBGWhdCCMCk8QQdtvsVJxYN2rN8A (from $GOROOT)
    /home/fiatjaf/comp/go/src/gx/ipfs/QmV58SA4ZdqFkdJXbbFBGWhdCCMCk8QQdtvsVJxYN2rN8A (from $GOPATH)
fiatjaf commented 6 years ago

Nevermind, the problem is that I was using a different hash.

Browsing $GOPATH/src/gx/ipfs/ helped me.