# Error while make setup in beat in windows 10

**URL:** <https://discuss.elastic.co/t/error-while-make-setup-in-beat-in-windows-10/157960>\
**Category:** Beats\
**Created:** [November 23, 2018, 6:02am UTC](https://discuss.elastic.co/t/error-while-make-setup-in-beat-in-windows-10/157960 "2018-11-23T06:02:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumanjha](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@sumanjha](https://discuss.elastic.co/u/sumanjha)\
**Post date:** [November 23, 2018, 6:02am UTC](https://discuss.elastic.co/t/error-while-make-setup-in-beat-in-windows-10/157960/1 "2018-11-23T06:02:02Z")

</div>

hi team,

I am getting error while make setup the custom beat in cmd after generating the beat. please help

D:\custom beat\src\[github.com](http://github.com)\Elastic\mybeat\>make setup  
INFO: Could not find files for the given pattern(s).  
can't load package: package [github.com/Elastic/mybeat/vendor/github.com/magefile/mage:](http://github.com/Elastic/mybeat/vendor/github.com/magefile/mage:) cannot find package "[github.com/Elastic/mybeat/vendor/github.com/magefile/mage](http://github.com/Elastic/mybeat/vendor/github.com/magefile/mage)" in any of:  
c:\go\src\[github.com](http://github.com)\Elastic\mybeat\vendor\[github.com](http://github.com)\magefile\mage (from $GOROOT)  
C:\Users\su336675\go\src\[github.com](http://github.com)\Elastic\mybeat\vendor\[github.com](http://github.com)\magefile\mage (from $GOPATH)  
'mage' is not recognized as an internal or external command,  
operable program or batch file.

---

<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:** [November 26, 2018, 8:32am UTC](https://discuss.elastic.co/t/error-while-make-setup-in-beat-in-windows-10/157960/2 "2018-11-26T08:32:36Z")

</div>

`mage` is missing from you system. You can find the installation steps here: [https://magefile.org/#installation](https://magefile.org/#installation)

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [November 26, 2018, 1:07pm UTC](https://discuss.elastic.co/t/error-while-make-setup-in-beat-in-windows-10/157960/3 "2018-11-26T13:07:53Z")

</div>

If you run the [generated `make.bat`](https://github.com/elastic/beats/blob/master/generator/beat/%7Bbeat%7D/make.bat) that should bootstrap `mage` into your `$GOPATH/bin`. Assuming `$PATH` includes `$GOPATH/bin` then it should find `mage`.

That being said, I'm not sure how well any of the Makefile logic works on Windows.

---

<div class="post-metadata">

**Author:** ![sumanjha](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@sumanjha](https://discuss.elastic.co/u/sumanjha)\
**Post date:** [November 29, 2018, 5:25am UTC](https://discuss.elastic.co/t/error-while-make-setup-in-beat-in-windows-10/157960/4 "2018-11-29T05:25:51Z")

</div>

Thanks for the reply @andrewkroh. Actually I have installed GnuMake32 software for running make setup command. After running the make setup command in windows, I am able to generate mage.exe in C:\Go\bin path but on executing this mage.exe, I am getting below error

C:\Go\bin\>mage.exe  
Error: failed to check types in directory: magefile.go:27:2: could not import [github.com/magefile/mage/mg](http://github.com/magefile/mage/mg) (cannot find package "[github.com/magefile/mage/mg](http://github.com/magefile/mage/mg)" in any of:  
c:\go\src\[github.com](http://github.com)\magefile\mage\mg (from $GOROOT)  
C:\Go\src\[github.com](http://github.com)\magefile\mage\mg (from $GOPATH))

Moreover, I am facing lot of issues and confusion in creating custom beat. Is there anyway to clarify my confusion regarding beat. I would be grateful if you can help

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [November 29, 2018, 3:25pm UTC](https://discuss.elastic.co/t/error-while-make-setup-in-beat-in-windows-10/157960/5 "2018-11-29T15:25:04Z")

</div>

During `setup` the mage libraries should have been installed to the `vendor/` directory. You can install the project in a number of ways, but make sure you use the same version that we have in elastic/beats to ensure compatibility.

> <https://github.com/elastic/beats/blob/671cdc01989548f5ef6401fb666ab5e512c2ca33/generator/beat/%7Bbeat%7D/Makefile#L25>

> [@sumanjha](#):
>
> Moreover, I am facing lot of issues and confusion in creating custom beat. Is there anyway to clarify my confusion regarding beat. I would be grateful if you can help

Use this `Community Beats` forum to ask those questions.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 27, 2018, 5:25pm UTC](https://discuss.elastic.co/t/error-while-make-setup-in-beat-in-windows-10/157960/6 "2018-12-27T17:25:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
