Kibana-4.1 LDAP Authentication Issue

Not able to load npm package 'ldap' in kibana.

I'm trying to use the ldap package in kibana.
Installed it by running npm install ldapjs and included it in package.json file
Added the ldap entry in require.config.js and also added "nodeRequire: require", so that it includes the ldapjs package.
But when i try to load the package using
var ldap=require('ldapjs');
It gives me the error, PFA screenshot of the error.

Can u tell me how to load this package. I guess the issue is since its a node package i'm not able to load it using require.config.js.

Please tell me how to include it in require.config.js so that i can use the ldapjs package in any of the js file.

If you want to integrate with LDAP, the easiest thing to do is use Shield. Kibana supports Shield out of the box, and in turn Shield supports LDAP out of the box.