Error while make setup in beat in windows 10


(Suman Kumar Jha) #1

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\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: cannot find package "github.com/Elastic/mybeat/vendor/github.com/magefile/mage" in any of:
c:\go\src\github.com\Elastic\mybeat\vendor\github.com\magefile\mage (from $GOROOT)
C:\Users\su336675\go\src\github.com\Elastic\mybeat\vendor\github.com\magefile\mage (from $GOPATH)
'mage' is not recognized as an internal or external command,
operable program or batch file.


(Noémi Ványi) #2

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


(Andrew Kroh) #3

If you run the generated 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.


(Suman Kumar Jha) #4

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 (cannot find package "github.com/magefile/mage/mg" in any of:
c:\go\src\github.com\magefile\mage\mg (from $GOROOT)
C:\Go\src\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


(Andrew Kroh) #5

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.

Use this Community Beats forum to ask those questions.