wunderio / radi-cli

CLI interface for the Radi-API
1 stars 2 forks source link

build can't find dependencies #31

Closed james-nesbitt closed 7 years ago

james-nesbitt commented 7 years ago

when running make locally, the following errors occur:

-> % make fmt binary install
"./build/make.sh" fmt
---> Make-bundle: fmt (in .)
  --> Applying go formatting (gofmt) to the entire application

"./build/make.sh" binary
---> Make-bundle: binary (in .)
  --> Building ./bin/radi
radi/command.go:6:2: cannot find package "github.com/Sirupsen/logrus" in any of:
    /usr/lib/go/src/github.com/Sirupsen/logrus (from $GOROOT)
    /home/james/.local/share/go/src/github.com/Sirupsen/logrus (from $GOPATH)
radi/operation.go:10:2: cannot find package "github.com/wunderkraut/radi-api/operation" in any of:
    /usr/lib/go/src/github.com/wunderkraut/radi-api/operation (from $GOROOT)
    /home/james/.local/share/go/src/github.com/wunderkraut/radi-api/operation (from $GOPATH)
radi/command.go:9:2: cannot find package "github.com/wunderkraut/radi-api/operation/command" in any of:
    /usr/lib/go/src/github.com/wunderkraut/radi-api/operation/command (from $GOROOT)
    /home/james/.local/share/go/src/github.com/wunderkraut/radi-api/operation/command (from $GOPATH)
radi/operation.go:11:2: cannot find package "github.com/wunderkraut/radi-api/operation/security" in any of:
    /usr/lib/go/src/github.com/wunderkraut/radi-api/operation/security (from $GOROOT)
    /home/james/.local/share/go/src/github.com/wunderkraut/radi-api/operation/security (from $GOPATH)
radi/settings.go:6:2: cannot find package "github.com/wunderkraut/radi-handlers/bytesource" in any of:
    /usr/lib/go/src/github.com/wunderkraut/radi-handlers/bytesource (from $GOROOT)
    /home/james/.local/share/go/src/github.com/wunderkraut/radi-handlers/bytesource (from $GOPATH)
radi/discover.go:8:2: cannot find package "github.com/wunderkraut/radi-handlers/local" in any of:
    /usr/lib/go/src/github.com/wunderkraut/radi-handlers/local (from $GOROOT)
    /home/james/.local/share/go/src/github.com/wunderkraut/radi-handlers/local (from $GOPATH)
radi/command.go:7:2: cannot find package "gopkg.in/urfave/cli.v2" in any of:
    /usr/lib/go/src/gopkg.in/urfave/cli.v2 (from $GOROOT)
    /home/james/.local/share/go/src/gopkg.in/urfave/cli.v2 (from $GOPATH)
make: *** [Makefile:20: binary] Error 1
james-nesbitt commented 7 years ago

This is expected behaviour. GoLang builds expect to be run inside GOPATH. If you do not put the project source code into GOPATH/src/XXX then the go compiler will not use the vendor path.