Search code examples
pluginsgrafanadatasourcegrafana-templating

Grafana issue with a new datasource plugin - define is not a function


I used this documentation to create a brand new backend datasource plugin for Grafana.

When I start Grafana with docker compose up. I define a new datasource and set it to my new plugin I got this issue :

issue

What can cause this ?

I see nothing on the browser console or the docker logs.


Solution

  • I resolved the issue.

    When I ran npm run dev I got this message :

    npm run dev issue

    By creating the folder src in .config/webpack it solved the problem. The npm run dev command ran correctly. I can now see my plugin without any issue in Grafana.