# Cannot read properties of undefined (reading 'hapi')"

**URL:** https://discuss.elastic.co/t/cannot-read-properties-of-undefined-reading-hapi/339403
**Category:** Kibana
**Tags:** elastic-stack-security
**Created:** [July 27, 2023, 8:45am UTC](https://discuss.elastic.co/t/cannot-read-properties-of-undefined-reading-hapi/339403 "2023-07-27T08:45:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chep](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@chep](https://discuss.elastic.co/u/chep)
#### Post date: [July 27, 2023, 8:45am UTC](https://discuss.elastic.co/t/cannot-read-properties-of-undefined-reading-hapi/339403/1 "2023-07-27T08:45:29Z")

</div>

curl -X POST "KIbana URL/api/detection\_engine/rules/\_import" -H 'Content-Type: application/json' -u offsec:student -H 'kbn-xsrf: true' -H 'Content-Type: multipart/form-data' --form "file=@/home/bourne/Downloads/rules\_export.ndjson"

I am trying to import multiple rules to the ELK but I keep getting the error below.How do I fix it?  
{"message":"Cannot read properties of undefined (reading 'hapi')","status\_code":500}

---

<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: [August 24, 2023, 8:45am UTC](https://discuss.elastic.co/t/cannot-read-properties-of-undefined-reading-hapi/339403/2 "2023-08-24T08:45:37Z")

</div>

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