最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - Directory import '...@muimaterialstyles' is not supported resolving ES modules imported from ...@toolp

programmeradmin0浏览0评论

I want to develop an application with react router and MUI material.

To create a dashboard, I want to use Toolpad from MUI material, but when I want to test the template. I get the following error : Directory import '...@mui\material\styles' is not supported resolving ES modules imported from ...@toolpad\core\AppProvider\AppProvider.js

Here is the following imports :

import BarChartIcon from "@mui/icons-material/BarChart";
import DashboardIcon from "@mui/icons-material/Dashboard";
import DescriptionIcon from "@mui/icons-material/Description";
import LayersIcon from "@mui/icons-material/Layers";
import ShoppingCartIcon from "@mui/icons-material/ShoppingCart";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import { createTheme } from "@mui/material/styles";
import { AppProvider, type Navigation } from "@toolpad/core/AppProvider";
import { DashboardLayout } from "@toolpad/core/DashboardLayout";
import { useDemoRouter } from "@toolpad/core/internal";

I check and my dependencies is correctly install in my package.json :

"dependencies": {
    "@emotion/react": "^11.14.0",
    "@emotion/styled": "^11.14.0",
    "@mui/material": "^6.4.0",
    "@mui/icons-material": "^6.4.0",
    "@react-router/node": "^7.1.3",
    "@react-router/serve": "^7.1.3",
    "@toolpad/core": "^0.12.0",
    "isbot": "^5.1.17",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "react-router": "^7.1.3"
  },

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论