This might help you I am not sure this will help your particular issue but I can share some pits I have fallen into while working with Material UI package for almost two years that all cause the behavior you have explained. Make sure your project dependencies include only one version of each of @material-ui packages. styles wont apply well if there is more than one styles version present in the project. Make sure all @material-ui packages you use are updated to latest version. They might not behave well together, if you miss an upgrade. Try along with using from @material-ui/core/styles (or replace it with). I bumped into this issue some time ago while being on version 4. If I recall correctly it was because my project used both class and functional components.
Material Image List Error: @import "@material/feature-targeting/functions";
By : bsEdwards
Date : September 25 2020, 01:00 PM
This might help you Add node_modules to the style preprocessor options in angular.json, so that the import path can be resolved: