# Make package fails for beats plugin

**URL:** https://discuss.elastic.co/t/make-package-fails-for-beats-plugin/137953
**Category:** Beats
**Tags:** beats-development
**Created:** [June 29, 2018, 11:39am UTC](https://discuss.elastic.co/t/make-package-fails-for-beats-plugin/137953 "2018-06-29T11:39:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Manjukb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manjukb/32/33758_2.png) [@Manjukb](https://discuss.elastic.co/u/Manjukb)
#### Post date: [June 29, 2018, 11:39am UTC](https://discuss.elastic.co/t/make-package-fails-for-beats-plugin/137953/1 "2018-06-29T11:39:45Z")

</div>

trying to build a new beats plugin

`make package` fails with bellow error

```
Working directory=/go
Copying main source folder /source to folder /go
Fetching dependencies...
Execute /scripts/before_build.sh 
cp: cannot stat 'fields.yml': No such file or directory
vendor/github.com/elastic/beats/libbeat/scripts/Makefile:469: 
recipe for target 'prepare-package-cgo' failed
make[1]: *** [prepare-package-cgo] Error 1
make[1]: Leaving directory 
'/home/smartthink/go/src/github.com/Manjukb/smartcenter'
vendor/github.com/elastic/beats/libbeat/scripts/Makefile:513: 
recipe for target 'package' failed
make: *** [package] Error 2

```

please let me know what might be the issue

---

<div class="post-metadata">

### Author: ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)
#### Post date: [June 29, 2018, 1:08pm UTC](https://discuss.elastic.co/t/make-package-fails-for-beats-plugin/137953/2 "2018-06-29T13:08:33Z")

</div>

Hello @Manjukb

From the message you are missing the **fields.yml** file, it should be present but  
you can regenerate it by running the command`make update` and run `make package` after.

Are you running the master branch?

---

<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: [July 27, 2018, 1:10pm UTC](https://discuss.elastic.co/t/make-package-fails-for-beats-plugin/137953/3 "2018-07-27T13:10:39Z")

</div>

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