I am working on a docView plugin and I'm trying to import an external NPM module which actually is a angular.module. The module I am trying to import, have some useful services and directives in it, directives based on angular-ui-bootstrap version ^2.2.0. In the newer versions of angular bootstrap the $tooltip have been replaced with $uibTooltip, so when testing the plugin I get an error message: Uncaught Error: [$injector:modulerr] Failed to instantiate module kibana due to: Error: [$injector:unpr] Unknown provider: $tooltipProvider
My opinion is that the angular bootstrap versions conflict and this is why I get the error message. Can someone explain to me a workaround this one?
If your plugin has dependencies which conflict with those in Kibana, it sounds like you have three options:
Fork Kibana and update the dependencies (not recommended because this will be very difficult for you to maintain as we develop Kibana).
Create a PR into Kibana which updates angular-ui-bootstrap to the version you need (may be somewhat difficult, but not impossible).
Use a different dependency or fork the dependency and downgrade the version of angular-ui-bootstrap it uses (not sure how hard this will be; I think you're in a better position to determine this).
I'd recommend trying #2 first. I'd be happy to review your PR and help you get it merged in, just tag me @cjcenizal when you submit it. If that doesn't work, I'd suggest #3. Sometimes taking control over a dependency is best because you can decide exactly what code makes it into your codebase. #1 is the nuclear option and not recommended.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.