Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't resolve '@material-ui/core/TableContainer

Tags:

I want to import table container for my react application. but I can't use it because of my material ui version error. How i update my version to latest version. I suppose that it's the solution for that error. I have already tried npm uninstall and npm uninstall, but didn't solve yet. Help me.

{
  "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",
like image 631
ddmmcc Avatar asked Feb 14 '20 07:02

ddmmcc


2 Answers

@material-ui/core version ^3.9.4 doesn't have <TableContainer>

so you need to update @materia-ui/core version

latest version v4.9.2, so please update version and try

like image 93
rajan tank Avatar answered Sep 28 '22 20:09

rajan tank


1) Go to package.json file in your project root.

2) Locate @material-ui/core in dependencies. Currently, you will see it as "@material-ui/core": "^3.9.4".

3) Now edit the version number. For example, "@material-ui/core": "^4.9.2".

4) Run npm install.

That's it!

You can follow this procedure for any dependency when you want to change the version. But make sure that those versions are compatible with each other dependencies (if any).

Good luck!

like image 23
Sennen Randika Avatar answered Sep 28 '22 20:09

Sennen Randika