【问题标题】:Module not found , its been showing the given below error even after i reinstalled and checked every address找不到模块,即使在我重新安装并检查了每个地址后,它仍然显示以下错误
【发布时间】:2021-09-09 15:10:56
【问题描述】:
./src/components/showStudent/showStudent.js
未找到模块:无法解析 'C:\Users\USER\Desktop\Database\client\src\components\showStudent 中的 '@material-ui/data-grid'
showstudent 下面的代码是直接从materialui网站复制的表格
【问题讨论】:
标签:
javascript
reactjs
react-native
react-redux
material-ui
【解决方案1】:
您正在使用 DataGrid,但它没有安装在项目中。
选择你喜欢的包管理器,安装@material-ui/data-grid。
// with npm
npm install @material-ui/data-grid
// with yarn
yarn add @material-ui/data-grid
现在,您必须导入组件,如下所示。为避免名称冲突,该组件被命名为 DataGrid。
import { DataGrid } from "@material-ui/data-grid";