rwynn / monstache

a go daemon that syncs MongoDB to Elasticsearch in realtime. you know, for search.
https://rwynn.github.io/monstache-site/
MIT License
1.29k stars 181 forks source link

Unable to 'go install' #176

Closed nakulm95 closed 5 years ago

nakulm95 commented 5 years ago

I pulled the most recent changes and tried to install monstache from source. Normally this works fine, but now it's giving me the following error:

$ go install
go: gopkg.in/sourcemap.v1@v1.0.5: reading gopkg.in/sourcemap/go.mod at revision v1.0.5: unknown revision refs/tags/v1.0.5
go: error loading module requirements

Any idea(s)? I checked the package github page and 1.0.5 exists as a tag, though there's no file called 'go.mod' in the directory.

rwynn commented 5 years ago

Are you trying to build from master or rel3 branch? I cleared out everything under my $GOPATH and did a fresh go install and didn't see any errors. It printed this out...

vagrant@vagrant:~/release/monstache$ go install
go: finding github.com/aws/aws-sdk-go v1.16.0
go: finding github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329
go: finding github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
go: finding github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142
go: finding github.com/BurntSushi/toml v0.3.1
go: finding github.com/evanphx/json-patch v4.1.0+incompatible
go: finding github.com/rwynn/gtm v0.0.0-20190131014030-4d96eedfb073
go: finding gopkg.in/Graylog2/go-gelf.v2 v2.0.0-20180326133423-4dbb9d721348
go: finding gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: finding gopkg.in/sourcemap.v1 v1.0.5
go: finding github.com/fortytw2/leaktest v1.3.0
go: finding github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding github.com/serialx/hashring v0.0.0-20180504054112-49a4782e9908
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/stretchr/testify v1.2.2
go: finding github.com/davecgh/go-spew v1.1.1
go: finding golang.org/x/net v0.0.0-20181201002055-351d144fa1fc
go: finding github.com/rwynn/mgo v0.0.0-20190203195949-55e8fd85e7e2
go: finding golang.org/x/text v0.3.0
go: finding github.com/pkg/errors v0.8.0
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: finding github.com/olivere/elastic v6.2.14+incompatible
go: finding gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
go: finding golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519
go: finding github.com/kr/pretty v0.1.0
go: finding gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
go: finding github.com/kr/text v0.1.0
go: finding github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
go: finding github.com/kr/pty v1.1.1
go: downloading golang.org/x/net v0.0.0-20181201002055-351d144fa1fc
go: downloading gopkg.in/Graylog2/go-gelf.v2 v2.0.0-20180326133423-4dbb9d721348
go: downloading github.com/rwynn/mgo v0.0.0-20190203195949-55e8fd85e7e2
go: downloading github.com/rwynn/gtm v0.0.0-20190131014030-4d96eedfb073
go: downloading github.com/aws/aws-sdk-go v1.16.0
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
go: downloading github.com/serialx/hashring v0.0.0-20180504054112-49a4782e9908
go: downloading github.com/olivere/elastic v6.2.14+incompatible
go: downloading github.com/pkg/errors v0.8.0
go: downloading github.com/evanphx/json-patch v4.1.0+incompatible
go: downloading github.com/BurntSushi/toml v0.3.1
go: downloading github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142
go: downloading gopkg.in/sourcemap.v1 v1.0.5
go: downloading github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329
go: downloading github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
go: finding github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8

Then I switched to branch rel3 and still no error...

vagrant@vagrant:~/release/monstache$ git checkout rel3
Switched to branch 'rel3'
Your branch is up-to-date with 'origin/rel3'.
vagrant@vagrant:~/release/monstache$ go install
go: finding github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d
go: finding github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9
go: finding github.com/smartystreets/gunit v0.0.0-20180314194857-6f0d6275bdcd
go: finding gopkg.in/olivere/elastic.v5 v5.0.76
go: finding github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5
go: finding github.com/fortytw2/leaktest v1.2.0
go: downloading gopkg.in/olivere/elastic.v5 v5.0.76
go: downloading github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9
go: downloading github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5
rwynn commented 5 years ago

Go version used was ...

vagrant@vagrant:~/release/monstache$ go version
go version go1.11.5 linux/amd64
nakulm95 commented 5 years ago

Are you trying to build from master or rel3 branch? I cleared out everything under my $GOPATH and did a fresh go install and didn't see any errors. It printed this out...

vagrant@vagrant:~/release/monstache$ go install
go: finding github.com/aws/aws-sdk-go v1.16.0
go: finding github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329
go: finding github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
go: finding github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142
go: finding github.com/BurntSushi/toml v0.3.1
go: finding github.com/evanphx/json-patch v4.1.0+incompatible
go: finding github.com/rwynn/gtm v0.0.0-20190131014030-4d96eedfb073
go: finding gopkg.in/Graylog2/go-gelf.v2 v2.0.0-20180326133423-4dbb9d721348
go: finding gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: finding gopkg.in/sourcemap.v1 v1.0.5
go: finding github.com/fortytw2/leaktest v1.3.0
go: finding github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding github.com/serialx/hashring v0.0.0-20180504054112-49a4782e9908
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/stretchr/testify v1.2.2
go: finding github.com/davecgh/go-spew v1.1.1
go: finding golang.org/x/net v0.0.0-20181201002055-351d144fa1fc
go: finding github.com/rwynn/mgo v0.0.0-20190203195949-55e8fd85e7e2
go: finding golang.org/x/text v0.3.0
go: finding github.com/pkg/errors v0.8.0
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: finding github.com/olivere/elastic v6.2.14+incompatible
go: finding gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
go: finding golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519
go: finding github.com/kr/pretty v0.1.0
go: finding gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
go: finding github.com/kr/text v0.1.0
go: finding github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
go: finding github.com/kr/pty v1.1.1
go: downloading golang.org/x/net v0.0.0-20181201002055-351d144fa1fc
go: downloading gopkg.in/Graylog2/go-gelf.v2 v2.0.0-20180326133423-4dbb9d721348
go: downloading github.com/rwynn/mgo v0.0.0-20190203195949-55e8fd85e7e2
go: downloading github.com/rwynn/gtm v0.0.0-20190131014030-4d96eedfb073
go: downloading github.com/aws/aws-sdk-go v1.16.0
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
go: downloading github.com/serialx/hashring v0.0.0-20180504054112-49a4782e9908
go: downloading github.com/olivere/elastic v6.2.14+incompatible
go: downloading github.com/pkg/errors v0.8.0
go: downloading github.com/evanphx/json-patch v4.1.0+incompatible
go: downloading github.com/BurntSushi/toml v0.3.1
go: downloading github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142
go: downloading gopkg.in/sourcemap.v1 v1.0.5
go: downloading github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329
go: downloading github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
go: finding github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8

Then I switched to branch rel3 and still no error...

vagrant@vagrant:~/release/monstache$ git checkout rel3
Switched to branch 'rel3'
Your branch is up-to-date with 'origin/rel3'.
vagrant@vagrant:~/release/monstache$ go install
go: finding github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d
go: finding github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9
go: finding github.com/smartystreets/gunit v0.0.0-20180314194857-6f0d6275bdcd
go: finding gopkg.in/olivere/elastic.v5 v5.0.76
go: finding github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5
go: finding github.com/fortytw2/leaktest v1.2.0
go: downloading gopkg.in/olivere/elastic.v5 v5.0.76
go: downloading github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9
go: downloading github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5

Using the master branch and I'm building this outside of my $GOPATH so there shouldn't be version issues, right?

rwynn commented 5 years ago

Right. Do you still get an error? I cannot recreate it.

nakulm95 commented 5 years ago

Yup still the same error. I don't have that package installed under my GOPATH either so not sure why it's giving that error

rwynn commented 5 years ago

What version of git do you have installed? Could it be this?.

I've got git version 2.17.1 and go install is OK.

rwynn commented 5 years ago

Maybe also try go clean -cache in addition to removing the pkg dir under $GOPATH.

nakulm95 commented 5 years ago

Maybe also try go clean -cache in addition to removing the pkg dir under $GOPATH.

This seemed to do the trick. Not sure how removing the 'mod' directory inside the pkg dir made the error go away..

Anyway, thanks!