【问题标题】: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";
    

    【讨论】:

      猜你喜欢
      • 2019-05-09
      • 1970-01-01
      • 2018-05-15
      • 2019-10-02
      • 1970-01-01
      • 1970-01-01
      • 2020-07-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多