无法解析 '@material-ui/core/TableContainer
Can't resolve '@material-ui/core/TableContainer
我想为我的 React 应用程序导入 table 容器。但是因为我的 material ui 版本错误我不能使用它。
我如何将我的版本更新到最新版本。我想这是该错误的解决方案。
npm uninstall 和npm uninstall 都试过了,都没有解决。帮帮我。
{
"name": "material-dashboard-react",
"version": "1.6.0",
"description": "Material Dashboard React. Coded by Creative Tim",
"private": false,
"main": "dist/index.js",
"dependencies": {
"@khanacademy/react-multi-select": "^0.3.3",
"@lls/react-light-calendar": "^2.0.7",
"@material-ui/core": "^3.9.4",
"@material-ui/icons": "3.0.2",
"@progress/kendo-react-dropdowns": "^3.4.1",
"@progress/kendo-react-intl": "^3.4.1",
"animate.css": "^3.7.2",
"axios": "^0.19.1",
"bootstrap": "^4.3.1",
"chartist": "0.10.1",
"classnames": "2.2.6",
"firebase": "^7.0.0",
"history": "4.7.2",
"jquery": "^1.9.1",
"material-ui-next-responsive-table": "^0.5.1",
"multi-select-react": "^0.1.8",
"multiselect-dropdown-react": "^1.0.5",
"multiselect-react-dropdown": "^1.2.4",
"perfect-scrollbar": "1.4.0",
"prettier": "1.16.4",
"prop-types": "15.7.1",
"react": "^16.8.1",
"react-bootstrap": "^1.0.0-beta.12",
"react-bootstrap-dialog": "^0.13.0",
"react-bootstrap-modal": "^4.2.0",
"react-chartist": "0.13.3",
"react-confirm-alert": "^2.4.1",
"react-datepicker": "^2.9.6",
"react-devtools": "^4.4.0",
"react-dialog": "^1.0.2",
"react-dom": "16.8.1",
"react-dropdown": "^1.6.4",
"react-dropdown-multiselect": "^1.0.0",
"react-dropdown-tree-select": "^2.1.1",
"react-google-maps": "9.4.5",
"react-light-calendar": "^1.0.3",
"react-multiple-select-dropdown": "^2.0.0",
"react-multiselect-checkboxes": "^0.1.1",
"react-notification-alert": "0.0.12",
"react-notifications": "^1.4.3",
"react-notifications-component": "^2.1.0",
"react-router-dom": "^4.3.1",
"react-scripts": "2.1.5",
"react-select": "^3.0.8",
"react-swipeable-views": "0.13.1",
"react-table-container": "^2.0.3",
"react-toastify": "^5.4.0",
@material-ui/core
版本 ^3.9.4 没有 <TableContainer>
所以你需要更新@materia-ui/core版本
最新版本v4.9.2,请更新版本试试
1) 转到项目根目录中的 package.json
文件。
2) 在dependencies
中找到@material-ui/core
。目前,您会看到它为 "@material-ui/core": "^3.9.4"
.
3) 现在编辑版本号。例如,"@material-ui/core": "^4.9.2"
.
4) 运行 npm install
.
就是这样!
当您想要更改版本时,您可以对任何依赖项执行此过程。但是请确保这些版本与其他依赖项(如果有)兼容。
祝你好运!
我想为我的 React 应用程序导入 table 容器。但是因为我的 material ui 版本错误我不能使用它。 我如何将我的版本更新到最新版本。我想这是该错误的解决方案。 npm uninstall 和npm uninstall 都试过了,都没有解决。帮帮我。
{
"name": "material-dashboard-react",
"version": "1.6.0",
"description": "Material Dashboard React. Coded by Creative Tim",
"private": false,
"main": "dist/index.js",
"dependencies": {
"@khanacademy/react-multi-select": "^0.3.3",
"@lls/react-light-calendar": "^2.0.7",
"@material-ui/core": "^3.9.4",
"@material-ui/icons": "3.0.2",
"@progress/kendo-react-dropdowns": "^3.4.1",
"@progress/kendo-react-intl": "^3.4.1",
"animate.css": "^3.7.2",
"axios": "^0.19.1",
"bootstrap": "^4.3.1",
"chartist": "0.10.1",
"classnames": "2.2.6",
"firebase": "^7.0.0",
"history": "4.7.2",
"jquery": "^1.9.1",
"material-ui-next-responsive-table": "^0.5.1",
"multi-select-react": "^0.1.8",
"multiselect-dropdown-react": "^1.0.5",
"multiselect-react-dropdown": "^1.2.4",
"perfect-scrollbar": "1.4.0",
"prettier": "1.16.4",
"prop-types": "15.7.1",
"react": "^16.8.1",
"react-bootstrap": "^1.0.0-beta.12",
"react-bootstrap-dialog": "^0.13.0",
"react-bootstrap-modal": "^4.2.0",
"react-chartist": "0.13.3",
"react-confirm-alert": "^2.4.1",
"react-datepicker": "^2.9.6",
"react-devtools": "^4.4.0",
"react-dialog": "^1.0.2",
"react-dom": "16.8.1",
"react-dropdown": "^1.6.4",
"react-dropdown-multiselect": "^1.0.0",
"react-dropdown-tree-select": "^2.1.1",
"react-google-maps": "9.4.5",
"react-light-calendar": "^1.0.3",
"react-multiple-select-dropdown": "^2.0.0",
"react-multiselect-checkboxes": "^0.1.1",
"react-notification-alert": "0.0.12",
"react-notifications": "^1.4.3",
"react-notifications-component": "^2.1.0",
"react-router-dom": "^4.3.1",
"react-scripts": "2.1.5",
"react-select": "^3.0.8",
"react-swipeable-views": "0.13.1",
"react-table-container": "^2.0.3",
"react-toastify": "^5.4.0",
@material-ui/core
版本 ^3.9.4 没有 <TableContainer>
所以你需要更新@materia-ui/core版本
最新版本v4.9.2,请更新版本试试
1) 转到项目根目录中的 package.json
文件。
2) 在dependencies
中找到@material-ui/core
。目前,您会看到它为 "@material-ui/core": "^3.9.4"
.
3) 现在编辑版本号。例如,"@material-ui/core": "^4.9.2"
.
4) 运行 npm install
.
就是这样!
当您想要更改版本时,您可以对任何依赖项执行此过程。但是请确保这些版本与其他依赖项(如果有)兼容。
祝你好运!