Grafana panel using MUI-5 (formerly Material-UI) fails to load

We are in the process of migrating from Material-UI 4 to MUI-5.
However, when including any MUI-5 components on a Grafana panel plugin, the panel fails to load.

I created a panel plugin to demonstrate this, here:

I tested this with Grafana version 8.1.4

MUI Docs can be found here:

Sounds like it could be a dependency problem. Do you have any logs or errors that you can share?

There is a screenshot of the client side logs here:
https://github.com/RAM92/grafana-mui-5-panel-issue/blob/master/screenshot.PNG

Looks like emotion is the culprit here. I seem to remember there was a change to the emotion package being used in 8.x. Does it work with Grafana 7.x?

Tested with Grafana v7.5.7 - unfortunately has the same issue! Error message is the same.

I have some time does anyone know which thread to start pulling to get MUI5 working with Grafana@latest? Version 4 for MUI works great.
As others have mentions, it seems like emotion is the issue and I know MUI5 styling engine leverages emotion but also allows the option of styled components as well.
Any hints / guidance would be appreciated but not needed. Thanks.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.