# GenerateCustomBeat returns error for missing github.com/elastic/beats/v7

**URL:** https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785
**Category:** Beats
**Tags:** beats-development
**Created:** [March 16, 2020, 3:16pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785 "2020-03-16T15:16:03Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![andrew-expanse](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andrew-expanse](https://discuss.elastic.co/u/andrew-expanse)
#### Post date: [March 16, 2020, 3:16pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/1 "2020-03-16T15:16:03Z")

</div>

Hi all,

I'm attempting to create a new custom beat but am hitting some errors when using the `mage GenerateCustomBeat` command.

```auto
mage GenerateCustomBeat
Enter the beat name [examplebeat]: testbeat
Enter your github name [your-github-name]: andrewexpanse
Enter the beat path [github.com/andrewexpanse/testbeat]:
Enter your full name [Firstname Lastname]: Andrew Scott
Enter the github.com/elastic/beats revision [master]:
go: creating new go.mod: module github.com/andrewexpanse/testbeat
go get github.com/elastic/beats/v7@master: module github.com/elastic/beats@master found (v7.0.0-alpha2.0.20200224095451-b0c600a28dbc+incompatible), but does not contain package github.com/elastic/beats/v7
Error: error while getting required beats version: running "go get -d -u github.com/elastic/beats/v7@master" failed with exit code 1

```

I did some searching but haven't seen any relevant topics yet. My dev environment is fresh after following these guidelines ([https://www.elastic.co/guide/en/beats/devguide/current/beats-contributing.html#setting-up-dev-environment](https://www.elastic.co/guide/en/beats/devguide/current/beats-contributing.html#setting-up-dev-environment)).

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [March 16, 2020, 3:43pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/2 "2020-03-16T15:43:20Z")

</div>

It seems like go is trying to fetch a too old version of master branch. We need to adjust the default value to make sure Go is not attempting to fetch an incorrect version. Do you mind opening an issue on GH?

You can work around the issue by providing the last commit from master.

---

<div class="post-metadata">

### Author: ![andrew-expanse](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andrew-expanse](https://discuss.elastic.co/u/andrew-expanse)
#### Post date: [March 17, 2020, 2:49pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/3 "2020-03-17T14:49:32Z")

</div>

Created [https://github.com/elastic/beats/issues/17033](https://github.com/elastic/beats/issues/17033)

When you say I could work around this by providing the last commit from master, do you mean I should enter a commit hash/id when asked `Enter the github.com/elastic/beats revision`?

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [March 17, 2020, 6:49pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/4 "2020-03-17T18:49:52Z")

</div>

Exactly. Sorry for not being clear.

---

<div class="post-metadata">

### Author: ![andrew-expanse](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andrew-expanse](https://discuss.elastic.co/u/andrew-expanse)
#### Post date: [March 18, 2020, 4:23pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/5 "2020-03-18T16:23:50Z")

</div>

This could totally be user error - but I'm still seeing a very similar error when providing the last commit hash.

```auto
mage GenerateCustomBeat
Enter the beat name [examplebeat]: testbeat
Enter your github name [your-github-name]: andrewexpanse
Enter the beat path [github.com/andrewexpanse/testbeat]:
Enter your full name [Firstname Lastname]: Andrew Scott
Enter the beat type [beat]:
Enter the github.com/elastic/beats revision [master]: c06c106cabbd7252cf784f518c8188ef821913ea
go: creating new go.mod: module github.com/andrewexpanse/testbeat
go: downloading github.com/elastic/beats/v7 v7.0.0-alpha2.0.20200318142504-c06c106cabbd
go: github.com/elastic/beats/v7 c06c106cabbd7252cf784f518c8188ef821913ea => v7.0.0-alpha2.0.20200318142504-c06c106cabbd
go: golang.org/x/text upgrade => v0.3.2
go: gopkg.in/yaml.v2 upgrade => v2.2.8
go: golang.org/x/sys upgrade => v0.0.0-20200317113312-5766fd39f98d
go: golang.org/x/tools upgrade => v0.0.0-20200318132943-540150da7399
go: github.com/pkg/errors upgrade => v0.9.1
go: go.uber.org/atomic upgrade => v1.6.0
go: github.com/jstemmer/go-junit-report upgrade => v0.9.1
go: github.com/mitchellh/hashstructure upgrade => v1.0.0
go: github.com/prometheus/procfs upgrade => v0.0.10
go: github.com/go-sourcemap/sourcemap upgrade => v2.1.3+incompatible
go: github.com/elastic/go-windows upgrade => v1.0.1
go: github.com/elastic/go-ucfg upgrade => v0.8.3
go: go.uber.org/zap upgrade => v1.14.1
go: github.com/dop251/goja_nodejs upgrade => v0.0.0-20200128125109-2d688c7e0ac4
go: github.com/dop251/goja upgrade => v0.0.0-20200309191912-043cf4f34a48
go: go.uber.org/multierr upgrade => v1.5.0
go: github.com/dlclark/regexp2 upgrade => v1.2.0
go: github.com/josephspurrier/goversioninfo upgrade => v0.0.0-20200309025242-14b0ab84c6ca
go: howett.net/plist upgrade => v0.0.0-20200225050739-77e249a2e2ba
go: github.com/rcrowley/go-metrics upgrade => v0.0.0-20200313005456-10cdbea86bc0
go: downloading golang.org/x/tools v0.0.0-20200318132943-540150da7399
go: downloading golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d
Error: expected 1 line, got 0 while looking for github.com/elastic/beats/v7

```

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [March 18, 2020, 4:48pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/6 "2020-03-18T16:48:11Z")

</div>

Probably not, a few parts of the generators are not working at the moment since we adapted go modules. Let me look into it.

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [March 18, 2020, 4:50pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/7 "2020-03-18T16:50:21Z")

</div>

What is your go version?

---

<div class="post-metadata">

### Author: ![andrew-expanse](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andrew-expanse](https://discuss.elastic.co/u/andrew-expanse)
#### Post date: [March 18, 2020, 4:50pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/8 "2020-03-18T16:50:57Z")

</div>

go1.14 darwin/amd64

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [March 18, 2020, 5:00pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/9 "2020-03-18T17:00:47Z")

</div>

The current supported Go version for beats is 1.13.8 as you can see in `.go-version`. Please use that to generate your new Beat. Also, that migth be broken as well. I am fixing that now.

The adoption of go 1.14 is tracked in this issue: [https://github.com/elastic/beats/issues/16566](https://github.com/elastic/beats/issues/16566)

---

<div class="post-metadata">

### Author: ![andrew-expanse](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andrew-expanse](https://discuss.elastic.co/u/andrew-expanse)
#### Post date: [March 18, 2020, 5:33pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/10 "2020-03-18T17:33:18Z")

</div>

Thanks so much @kvch !

For anyone else who runs into this, if you used brew to install go here's a handy guide for downgrading. [https://blog.notmyhostna.me/downgrade-go-installed-with-homebrew/](https://blog.notmyhostna.me/downgrade-go-installed-with-homebrew/)

---

<div class="post-metadata">

### Author: ![Johann\_Tanzer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johann_tanzer/32/65092_2.png) [@Johann\_Tanzer](https://discuss.elastic.co/u/Johann_Tanzer)
#### Post date: [March 26, 2020, 8:55am UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/11 "2020-03-26T08:55:28Z")

</div>

I have been trying for hours to get this to work and it is frustrating.

go version:

```auto
$ go version
go version go1.13.8 linux/amd64

```

when i try to generate with the last commit from master as revision, as mentioned above:

```auto
$ mage GenerateCustomBeat
Enter the beat name [examplebeat]: test
Enter your github name [your-github-name]: test
Enter the beat path [github.com/test/test]: 
Enter your full name [Firstname Lastname]: test
Enter the beat type [beat]: 
Enter the github.com/elastic/beats revision [master]: 70237a7b1ae1b36b9309278ee17085ea34cc032b
go: creating new go.mod: module github.com/test/test
go: finding github.com 70237a7b1ae1b36b9309278ee17085ea34cc032b
go: finding github.com/elastic/beats/v7 70237a7b1ae1b36b9309278ee17085ea34cc032b
go: finding github.com/elastic/beats 70237a7b1ae1b36b9309278ee17085ea34cc032b
go: finding github.com/elastic 70237a7b1ae1b36b9309278ee17085ea34cc032b
go: finding github.com/elastic/beats 70237a7b1ae1b36b9309278ee17085ea34cc032b
go: finding github.com/elastic/beats/v7 70237a7b1ae1b36b9309278ee17085ea34cc032b
go: finding github.com/dop251/goja_nodejs latest
go: finding github.com/dop251/goja latest
go: finding golang.org/x/sys latest
go: finding github.com/rcrowley/go-metrics latest
go: finding golang.org/x/tools latest
go: finding howett.net/plist latest
go: finding github.com/joeshaw/multierror latest
go: finding github.com/josephspurrier/goversioninfo latest
Cache entry deserialization failed, entry ignored
can't load package: package github.com/magefile/mage: no Go files in /home/johann/go/src/github.com/test/test/vendor/github.com/magefile/mage
make: *** [vendor/github.com/elastic/beats/v7/dev-tools/make/mage.mk:10: mage] Error 1
Error: running "make update" failed with exit code 2

```

I also tried different / older commits, as well as the branches 7.7, 7.6, .... nothing works

Did you get this to work @andrew-expanse ???

---

<div class="post-metadata">

### Author: ![Mike\_Ware](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike_ware/32/46467_2.png) [@Mike\_Ware](https://discuss.elastic.co/u/Mike_Ware)
#### Post date: [March 29, 2020, 5:28pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/12 "2020-03-29T17:28:48Z")

</div>

This is also effecting x-pack module builds.  
mage  
Error determining list of magefiles: failed to list non-mage gofiles: exit status 1: go: inconsistent vendoring in /root/go/src/github.com/elastic/beats:  
go.mod requires [github.com/elastic/beats/v7](http://github.com/elastic/beats/v7) but vendor/modules.txt does not include it.  
run 'go mod tidy; go mod vendor' to sync

running provided go sync and tidy does not fix it as there is no v7 module available.

---

<div class="post-metadata">

### Author: ![andrew-expanse](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andrew-expanse](https://discuss.elastic.co/u/andrew-expanse)
#### Post date: [March 29, 2020, 6:31pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/13 "2020-03-29T18:31:25Z")

</div>

I did manage to get it to work after some trial and error, but I've since restarted my machine and lost the command that actually worked - I believe I was just doing what you were doing here though.

---

<div class="post-metadata">

### Author: ![Mike\_Ware](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike_ware/32/46467_2.png) [@Mike\_Ware](https://discuss.elastic.co/u/Mike_Ware)
#### Post date: [March 30, 2020, 4:23pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/14 "2020-03-30T16:23:17Z")

</div>

This is what I'm getting when trying to get the module code. Keep in mind I can build filebeat but not the x-pack modules:

```auto
go mod tidy; go mod vendor
warning: ignoring symlink /root/go/src/github.com/elastic/beats/build/python-env/lib64
warning: ignoring symlink /root/go/src/github.com/elastic/beats/libbeat/build/python-env/lib64
github.com/elastic/beats/v7 imports
	fmt: malformed module path "fmt": missing dot in first path element
github.com/elastic/beats/v7 imports
	os: malformed module path "os": missing dot in first path element
github.com/elastic/beats/v7 imports
	path/filepath: malformed module path "path/filepath": missing dot in first path element
github.com/elastic/beats/v7/auditbeat imports
	time: malformed module path "time": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/datastore imports
	io: malformed module path "io": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/datastore imports
	sync: malformed module path "sync": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/helper/hasher imports
	crypto/md5: malformed module path "crypto/md5": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/helper/hasher imports
	crypto/sha1: malformed module path "crypto/sha1": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/helper/hasher imports
	crypto/sha256: malformed module path "crypto/sha256": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/helper/hasher imports
	crypto/sha512: malformed module path "crypto/sha512": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/helper/hasher imports
	encoding/hex: malformed module path "encoding/hex": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/helper/hasher imports
	hash: malformed module path "hash": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/helper/hasher imports
	strings: malformed module path "strings": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/auditd imports
	bufio: malformed module path "bufio": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/auditd imports
	bytes: malformed module path "bytes": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/auditd imports
	os/user: malformed module path "os/user": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/auditd imports
	runtime: malformed module path "runtime": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/auditd imports
	sort: malformed module path "sort": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/auditd imports
	strconv: malformed module path "strconv": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/auditd imports
	syscall: malformed module path "syscall": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/file_integrity imports
	errors: malformed module path "errors": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/file_integrity imports
	math/bits: malformed module path "math/bits": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/file_integrity imports
	sync/atomic: malformed module path "sync/atomic": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/module/file_integrity/monitor imports
	path: malformed module path "path": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/testing imports
	io/ioutil: malformed module path "io/ioutil": missing dot in first path element
github.com/elastic/beats/v7/auditbeat/testing imports
	testing: malformed module path "testing": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/cmd/dashboards imports
	flag: malformed module path "flag": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/cmd/dashboards imports
	log: malformed module path "log": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/cmd/dashboards imports
	net/url: malformed module path "net/url": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/cmd/license imports
	go/format: malformed module path "go/format": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/cmd/license imports
	text/template: malformed module path "text/template": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	archive/tar: malformed module path "archive/tar": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	archive/zip: malformed module path "archive/zip": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	compress/gzip: malformed module path "compress/gzip": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	context: malformed module path "context": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	encoding/json: malformed module path "encoding/json": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	go/build: malformed module path "go/build": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	net: malformed module path "net": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	net/http: malformed module path "net/http": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	os/exec: malformed module path "os/exec": missing dot in first path element
github.com/elastic/beats/v7/dev-tools/mage imports
	os/signal: malformed module path "os/signal": missing dot in first path element

etc etc

```

---

<div class="post-metadata">

### Author: ![nabeel\_ahmed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nabeel_ahmed/32/65455_2.png) [@nabeel\_ahmed](https://discuss.elastic.co/u/nabeel_ahmed)
#### Post date: [April 14, 2020, 3:35pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/15 "2020-04-14T15:35:36Z")

</div>

I am also facing the same issue on creating Custom beat  
Go Version: 1.14.2

```auto
nabeel@na-08:~/go/src/github.com/elastic/beats$ NEWBEAT_TYPE=metricbeat mage GenerateCustomBeat
    Enter the beat name [examplebeat]: check1
    Enter your github name [your-github-name]: nabeel08
    Enter the beat path [github.com/nabeel08/check1]: 
    Enter your full name [Firstname Lastname]: N n
    Enter the github.com/elastic/beats revision [master]: master
    go: creating new go.mod: module github.com/nabeel08/check1
    go: downloading github.com/elastic/beats/v7 v7.0.0-alpha2.0.20200414143427-07ed0dabcaab
    go: github.com/elastic/beats/v7 master => v7.0.0-alpha2.0.20200414143427-07ed0dabcaab
    go: github.com/mitchellh/hashstructure upgrade => v1.0.0
    go: github.com/pkg/errors upgrade => v0.9.1
    go: gopkg.in/yaml.v2 upgrade => v2.2.8
    go: github.com/go-sourcemap/sourcemap upgrade => v2.1.3+incompatible
    go: go.uber.org/zap upgrade => v1.14.1
    go: github.com/dop251/goja upgrade => v0.0.0-20200414142002-77e84ffb8c65
    go: github.com/dop251/goja_nodejs upgrade => v0.0.0-20200128125109-2d688c7e0ac4
    go: golang.org/x/tools upgrade => v0.0.0-20200414131530-0037cb7812fa
    go: github.com/elastic/go-ucfg upgrade => v0.8.3
    go: github.com/rcrowley/go-metrics upgrade => v0.0.0-20200313005456-10cdbea86bc0
    go: howett.net/plist upgrade => v0.0.0-20200225050739-77e249a2e2ba
    go: golang.org/x/sys upgrade => v0.0.0-20200413165638-669c56c373c4
    go: go.uber.org/multierr upgrade => v1.5.0
    go: golang.org/x/text upgrade => v0.3.2
    go: github.com/prometheus/procfs upgrade => v0.0.11
    go: github.com/elastic/go-windows upgrade => v1.0.1
    go: github.com/jstemmer/go-junit-report upgrade => v0.9.1
    go: github.com/dlclark/regexp2 upgrade => v1.2.0
    go: go.uber.org/atomic upgrade => v1.6.0
    go: github.com/josephspurrier/goversioninfo upgrade => v0.0.0-20200309025242-14b0ab84c6ca
    Error: error while copying required files to vendor: error while looking up cached dir of module: github.com/elastic/beats/v7: expected 1 line, got 0 while looking for github.com/elastic/beats/v7

```

Is there any workaround to solve this ?

---

<div class="post-metadata">

### Author: ![whatgeorgemade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatgeorgemade/32/103246_2.png) [@whatgeorgemade](https://discuss.elastic.co/u/whatgeorgemade)
#### Post date: [April 15, 2020, 9:00pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/16 "2020-04-15T21:00:58Z")

</div>

I managed to get it working by using a previous commit SHA. When asked for the revision of `beats` to use, don't just hit enter; paste in the SHA of the commit previous to the most recent in master, which is currently `52fa26598cef8a90c8981970414c780e4fd31dbf`.

You might also have to downgrade to Go 1.13.8.

---

<div class="post-metadata">

### Author: ![nabeel\_ahmed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nabeel_ahmed/32/65455_2.png) [@nabeel\_ahmed](https://discuss.elastic.co/u/nabeel_ahmed)
#### Post date: [April 16, 2020, 6:55am UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/17 "2020-04-16T06:55:34Z")

</div>

@ [whatgeorgemade](https://discuss.elastic.co/u/whatgeorgemade) Downgrading works for me.

---

<div class="post-metadata">

### Author: ![whatgeorgemade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatgeorgemade/32/103246_2.png) [@whatgeorgemade](https://discuss.elastic.co/u/whatgeorgemade)
#### Post date: [April 16, 2020, 10:06pm UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/18 "2020-04-16T22:06:11Z")

</div>

Can you explain what the `v7` part of the repository is? I can't find a branch or tag with that name but see it everywhere in the code. Why was this added?

I'm working on a PR that is based on a branch from master but now can't use it in a beat because it pulls `beats/v7` into the vendors folder.

EDIT: After reading up on Go modules I figured out that adding a `replace` to `go.mod` would suffice. After doing that and running `mage vendorUpdate`, I can test my branch.

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [April 20, 2020, 8:53am UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/19 "2020-04-20T08:53:37Z")

</div>

Go modules require us to add the major version to the import path:

> By definition, a new major version of a package is not backwards compatible with the previous version. This means a new major version of a module must have a different module path than the previous version. Starting with `v2` , the major version must appear at the end of the module path (declared in the `module` statement in the `go.mod` file). For example, when the authors of the module `github.com/googleapis/gax-go` developed `v2` , they used the new module path `github.com/googleapis/gax-go/v2` . Users who wanted to use `v2` had to change their package imports and module requirements to `github.com/googleapis/gax-go/v2` .

Ref: [Go Modules: v2 and Beyond - The Go Programming Language](https://blog.golang.org/v2-go-modules)

---

<div class="post-metadata">

### Author: ![Szanik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/szanik/32/68608_2.png) [@Szanik](https://discuss.elastic.co/u/Szanik)
#### Post date: [May 5, 2020, 10:19am UTC](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785/20 "2020-05-05T10:19:23Z")

</div>

Is there a better fix outhere?

I have the same problem.  
Ttried to downgrade my go version to 1.13.8  
and tried the commit that "whatgeorgemade" mentioned.  
And then again with the master.

nothing worked.  
It got suck on some the go: finding  
e.g.  
go: finding [github.com/josephspurrier/goversioninfo](http://github.com/josephspurrier/goversioninfo) latest

The problem is also that, at this point of writing, there are 541 Powershell process because of  
that.

[Next page](https://discuss.elastic.co/t/generatecustombeat-returns-error-for-missing-github-com-elastic-beats-v7/223785.md?page=2)
