Require is not defined

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

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

then the chrome console told me:

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?

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

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

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

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