Home > OS >  Module not found: Can't resolve '@material/core/Grid'
Module not found: Can't resolve '@material/core/Grid'

Time:02-13

I cloned a repository that uses MUI and the following components are already imported when I cloned (they work)

import Card from '@mui/material/Card'
import CardActions from '@mui/material/CardActions'
import CardContent from '@mui/material/CardContent'
import CardMedia from '@mui/material/CardMedia'
import Typography from '@mui/material/Typography'

then I tried to import Grid from '@material/core/Grid' but got the error Module not found: Can't resolve '@material/core/Grid' even though I ran the following commands both in the repository folder as well as "/Downloads":

npm install @material-ui/core
npm install
npm install @material-ui/core/Grid

I can provide more info if needed

CodePudding user response:

You see how all the working components are @mui/material/SOMETHING?

Also see the documentation for Grid.

It's import Grid from '@mui/material/Grid'; not from '@material/core/Grid'.

  • Related