Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

dep fails with root project import: xxx not in GOPATH #911

Closed
@karlmutch

Description

What version of Go (go version) and dep (git describe --tags) are you using?

go version go1.8 linux/amd64

$ cd src/github.com/golang/dep/
$ git describe --tags
v0.1.0-295-gd558b52

$ export | grep GO
GOPATH=/home/kmutch/example
GORACE='halt_on_error=1 history_size=7'
GOROOT=/home/kmutch/go

what commands did you run before running dep?

$ git clone https://github.com/caarlos0/example.git
Cloning into 'example'...
$ cd example
$ export GOPATH=pwd
$ export PATH=$GOPATH/bin:$PATH
$ make setup
go get -u github.com/alecthomas/gometalinter
go get -u github.com/golang/dep/...
go get -u github.com/pierrre/gotestcover
go get -u golang.org/x/tools/cmd/cover
dep ensure
root project import: /home/kmutch/example not in GOPATH
Makefile:6: recipe for target 'setup' failed
make: *** [setup] Error 1

What dep command did you run?

$ dep ensure
root project import: xxx not in GOPATH

What did you expect to see?

no errors and the dependencies downloaded into the vendor directory

What did you see instead?

root project import: xxxx not in GOPATH

I have also tried descending into subdirectories of the repo and running dep init from there to see if I can create the dep files, all to no avail.

I freely admit that GOPATH and its side effects are entirely and utterly beyond my comprehension.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions