1

I have material UI installed, but still can't import it. no error in my code, but when I run my react project I get this error.

    import React, {Component} from 'react';
import { Button, Container, Grid, TextField } from '@material-ui/core';
import { Link } from 'react-router-dom';
import { firebaseAuthentication, githubProvider } from '../config/firebase';

This is version information from my package.json

{
  "name": "auth-github",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^5.0.0-beta.5",
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "4.0.3",
    "web-vitals": "^1.0.1"
  },
MylesK
  • 3,349
  • 2
  • 9
  • 31
Rozani
  • 51
  • 7
  • Did you generate this application using create-react-app or is this done using a custom webpack configuration? As @Roopa Rauniyar mentioned in their answer, this is most likely not related to material-ui. If it's a custom webpack configuration, you may need to include a plugin to handle .css imports, such as [css-loader](https://webpack.js.org/loaders/css-loader/). – Chase Ingebritson Oct 11 '21 at 05:31
  • this is a custom webpack config, I've tried to add .css, but the result is the same. – Rozani Oct 11 '21 at 05:41
  • Are you attempting to import a file called Apps.css anywhere in your project? – Chase Ingebritson Oct 11 '21 at 05:56
  • Yeah, I do, there is in the same folder. – Rozani Oct 11 '21 at 06:05

0 Answers0