Open MarianCN opened 1 year ago
This is because you are using react 18 and the material table library current supports react 17. They need to update it.
try with npm install material-table --force I checked that it works with React 18
Will they update material table? I am using Next.js which goes well with React 18 and node 18 but it seems this supports react 17.
Any roadmap on this?
try with npm install material-table --force I checked that it works with React 18
Have someone tried this? Will there be any issues?
try with npm install material-table --force I checked that it works with React 18
Have someone tried this? Will there be any issues?
not working
I've tried to force install it, and it does work, at least for now, there's no issue when the app is running. The only issue I'm experiencing is:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
when trying to install other packages such as mongoose
. That said, I'm not very particularly sure whether is it a direct cause because of a forced install of material-table
or something else
Confirm, having exactly same problem with React 18
Most probably have to migrate to a fork of this repo, check out #3044
I'm not getting errors after migrating to the forked repo
npm i material-table Debugger attached. npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: stannerp002@0.1.0 npm ERR! Found: react@17.0.0 npm ERR! node_modules/react npm ERR! peer react@">=16.8.0" from @emotion/react@11.11.1 npm ERR! node_modules/@emotion/react npm ERR! @emotion/react@"^11.8.1" from react-select@5.8.0 npm ERR! node_modules/react-select npm ERR! react-select@"^5.8.0" from the root project npm ERR! peer react@">=16.8.0" from @emotion/use-insertion-effect-with-fallbacks@1.0.1 npm ERR! node_modules/@emotion/use-insertion-effect-with-fallbacks npm ERR! @emotion/use-insertion-effect-with-fallbacks@"^1.0.1" from @emotion/react@11.11.1 npm ERR! node_modules/@emotion/react npm ERR! @emotion/react@"^11.8.1" from react-select@5.8.0 npm ERR! node_modules/react-select npm ERR! react-select@"^5.8.0" from the root project npm ERR! 18 more (@react-aria/ssr, @restart/hooks, @restart/ui, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! material-table@"" from the root project npm ERR! npm ERR! Conflicting peer dependency: react@17.0.2 npm ERR! node_modules/react npm ERR! peer react@"^17.0.2" from material-table@2.0.5 npm ERR! node_modules/material-table npm ERR! material-table@"" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
on react@17.0.0 in can not install
after some time, it is still not working but hey Material React Table just released v2 and it looks so much better, also released ways of adding rows that are similar to material table, I don't think there will be a need to use material table since Material React Table is so much better now.
Guidelines
Please include a demo of the issue/behavior/question you have
Please try to be as detailed as possible
I'm trying to run
npm install material-table
and i get this error:My package.json is:
package.json
```json { "name": "myApp", "version": "0.1.1", "private": true, "dependencies": { "@emotion/react": "^11.10.6", "@emotion/styled": "^11.10.6", "@mui/icons-material": "^5.11.11", "@mui/material": "^5.11.15", "@mui/styled-engine": "^5.11.11", "@mui/x-data-grid": "^5.17.26", "@reduxjs/toolkit": "^1.8.5", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "@types/jest": "^27.5.2", "@types/node": "^16.18.23", "@types/react": "^18.0.32", "@types/react-dom": "^18.0.11", "@types/react-redux": "^7.1.25", "@types/react-router-dom": "^5.3.3", "@types/redux": "^3.6.0", "axios": "^0.27.2", "chart.js": "^4.2.1", "classnames": "^2.3.2", "copy-to-clipboard": "^3.3.2", "mui-tel-input": "^2.0.1", "react": "^18.2.0", "react-chartjs-2": "^5.2.0", "react-dom": "^18.2.0", "react-quill": "^2.0.0", "react-redux": "^8.0.2", "react-router-dom": "^6.3.0", "react-scripts": "^5.0.1", "react-toastify": "^9.0.8", "redux": "^4.2.0", "sass": "^1.60.0", "typescript": "^4.9.5", "web-vitals": "^2.1.4" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" } } ```Can anyone help me?