DEV Community

ankitpatelinitio
ankitpatelinitio

Posted on

Get several instances of `@material-ui/styles` initialized in this application warning.

I developed my own progress bar npm and publish it. I am using @material-ui/core npm to apply CSS styles on all elements in my progress bar npm.

After successfully publish my npm and install this npm package into my existing application. But @material-ui/core npm is already installed in my existing application and progress bar npm. So it gives me below warning and my npm functionality not working.

It looks like there are several instances of @material-ui/styles initialized in this application.
This may cause theme propagation issues, broken class names, specificity issues, and makes your application bigger without a good reason.

I refer https://material-ui.com/getting-started/faq/#i-have-several-instances-of-styles-on-the-page document also but not get any solution

Anyone, please suggest me a solution.

Top comments (1)

Collapse
 
matiasbavera profile image
Matías Bavera

Hi, did you find any solution to this?