React Router Dom not working in Grafana

  • What Grafana version and what operating system are you using?
  • Grafana version: 7.4.2
  • Data source type & version:
  • OS Grafana is installed on: Mac OS using home brew
  • User OS & Browser: Big Sur & [Chrome, Firefox]
  • Grafana plugins: n/a
  • Others:
  • What are you trying to achieve?
    Create a Grafana plugin that uses React Router Dom

  • How are you trying to achieve it?
    Create a panel plugin and adding react router Dom

  • What happened?
    I created a simple panel app in Grafana that uses react-router-dom following the basic example on the react-router-dom website.
    Also using Memory Router to hide the routes from the path so it does not conflict with Grafana.

However the plugin does not load in Grafana and it show the error: GET localhost:3000/public/react-router-dom?_cache=1647427969793
HTTP/1.1 404 Not Found 5ms

Screenshot 2022-03-16 at 13.11.13

i am using these packages
@types/react-dom”: “^17.0.13”,
@types/react-router-dom”: “^5.3.3”,
“react-dom”: “^17.0.2”,
“react-router-dom”: “^5.3.0”,
“react-scripts-ts”: “^3.1.0”

  • What did you expect to happen?
    The plugin should have loaded without ant errors.

  • Can you copy/paste the configuration(s) that you are having problems with?
    There is no specific configuration.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    GET localhost:3000/public/react-router-dom?_cache=1647427969793
    HTTP/1.1 404 Not Found 5ms

  • Did you follow any online instructions? If so, what is the URL?
    Yes.