# Require is not defined

**URL:** <https://discuss.elastic.co/t/require-is-not-defined/76997>\
**Category:** Kibana\
**Created:** [March 1, 2017, 2:29pm UTC](https://discuss.elastic.co/t/require-is-not-defined/76997 "2017-03-01T14:29:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![whoami](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@whoami](https://discuss.elastic.co/u/whoami)\
**Post date:** [March 1, 2017, 2:29pm UTC](https://discuss.elastic.co/t/require-is-not-defined/76997/1 "2017-03-01T14:29:07Z")

</div>

when I use some angular library in my plugins always be told with`require is not defined`, such as library `angularjs-slider`, I use it like below:

```auto
import 'angularjs-slider/src/rzslider';
import 'angularjs-slider/dist/rzslider.min.css';

```

then the chrome console told me:

```auto
Uncaught ReferenceError: require is not defined
    at Object.495 (index.js:1)
    at __webpack_require__ (bootstrap b2a4ee7…:50)
    at rzslider.js:16
    at Object.1375 (rzslider.js:32)
    at __webpack_require__ (bootstrap b2a4ee7…:50)
    at Object.494 (app.js:14)
    at __webpack_require__ (bootstrap b2a4ee7…:50)
    at Object.0 (esmeta.entry.js:38)
    at __webpack_require__ (bootstrap b2a4ee7…:50)
    at webpackJsonpCallback (bootstrap b2a4ee7…:21)

```

what's wrong with me?

---

<div class="post-metadata">

**Author:** ![whoami](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@whoami](https://discuss.elastic.co/u/whoami)\
**Post date:** [March 1, 2017, 2:42pm UTC](https://discuss.elastic.co/t/require-is-not-defined/76997/2 "2017-03-01T14:42:40Z")

</div>

seems i have to install the dependencies in the kibana root directory, why ?

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [March 1, 2017, 5:56pm UTC](https://discuss.elastic.co/t/require-is-not-defined/76997/3 "2017-03-01T17:56:37Z")

</div>

What version of Kibana are you developing against? If you're using the most recent versions this should not be a problem.

---

<div class="post-metadata">

**Author:** ![whoami](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@whoami](https://discuss.elastic.co/u/whoami)\
**Post date:** [March 2, 2017, 1:28am UTC](https://discuss.elastic.co/t/require-is-not-defined/76997/4 "2017-03-02T01:28:21Z")

</div>

hi @spalger ,  
thanks for your quick reply, I am using kibana 5.2.0

---

<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:** [March 30, 2017, 1:28am UTC](https://discuss.elastic.co/t/require-is-not-defined/76997/5 "2017-03-30T01:28:30Z")

</div>

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