Bonnie
Bonnie

Reputation: 195

Deploying go webapps to heroku: can't find package issue

I'm following this tutorial and attempting to deploy a bare-bones Go web app to Heroku, but am having difficulties resolving an error:

remote: -----> Running: godep go install -tags heroku ./... remote: main.go:7:3: cannot find package "github.com/russross/blackfriday" in any of: remote: /app/tmp/cache/go1.3.3/go/src/pkg/github.com/russross/blackfriday (from $GOROOT) remote: /tmp/build_1a204a91c152b49fe234bde14529ad27/.heroku/g/src/bitbucket.gotest/Godeps/_workspace/src/github.com/russross/blackfriday (from $GOPATH) remote: /tmp/build_1a204a91c152b49fe234bde14529ad27/.heroku/g/src/github.com/russross/blackfriday remote: godep: go exit status 1 remote: remote: ! Push rejected, failed to compile Go app

I'm new to Go, so I assume I've screwed up my package structure, but running $GOPATH/bin/godep go install or go install works fine.

Here's the (abbreviated) structure of my go directory:

Thanks.

Upvotes: 2

Views: 1546

Answers (1)

Bonnie
Bonnie

Reputation: 195

Fixed the issue by adding my $GOPATH/bin dir to my path.

export PATH=$PATH:$GOPATH/bin

Curious as to why this was necessary, though.

Upvotes: 2

Related Questions