Plugin's dependency to another plugin


In plugin.json, there’s the dependency part. I haven’t found any documentation on how the plugin dependencies are supposed to work.

First of all, if I define my Plugin A is dependant on Plugin X, what happens if I don’t have Plugin X? Will the dependency be installed automatically or do I get some error messages etc.?

Also, what is the format to define plugin dependency?
“dependencies”: {
“grafanaVersion”: “3.x.x”,
“plugins”: [“Plugin A”, “Plugin B” ] …or… [“plugin-a-id”, “plugin-b-id” ] …or… [?]


Had to dig in the code a bit to figure this out. This is an unused feature, I checked most of the installed plugins and not a single one uses this feature. If I remember correctly, this was implemented for the worldPing app so that it could bundle the Worldmap panel. But we ended up just including the panel in the app instead.

I don’t think it works - I just did a quick test and looked at the code and it seems broken and also ignores versions for the dependency.

If it did work, the plugin.json would look like this:

"dependencies": {
    "grafanaVersion": "4.5.x",
    "plugins": [{"id":"grafana-clock-panel", "version": "0.0.9"} ]

So I recommended to my colleague to remove this feature. It does not handle versions at all and does not really work. We might build it again in the future (with version handling like npm has) if there is a strong use case.

Thank you for your answer!

Related to removing the plugin dependency, this might need some updating, at least in case of removal:

I’ve been looking into the WorldPing app, and there’s at least “routes” and “includes” which aren’t documented on the plugin specification.


Yes, we definitely have a lot of work left on documenting plugin development - especially for the app-specific features. The routes feature is very powerful so I should really try and document that soon.

1 Like

Hi @daniellee,
I read your answer but the plugin dependency is still available in the plugin documentation.
So, my question is, can I use this system to create a plugin that contains common angular directives and then create another one that depends on the “common” plugin?

Thank you.