gregnb / mui-datatables

Datatables for React using Material-UI
MIT License
2.71k stars 934 forks source link

Please update to react 18 #1957

Open EssDevUi opened 2 years ago

EssDevUi commented 2 years ago

Could not resolve dependency: npm ERR! peer react@"^16.8.0 || ^17.0.2" I'm getting this error while installing mui 4.2.2 with latest version of react js "react": "^18.2.0", please update your peer dependency

skavan commented 2 years ago

ugh. ditto. any workarounds?

sp00ls commented 2 years ago

Here is a workaround, add this to your package.json just below the dependencies section:

"overrides": {
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "@mui/material": "^5.10.11"
}

Adjust for your actual versions of course :)

pintosack commented 2 years ago

Here is a workaround, add this to your package.json just below the dependencies section:

"overrides": { "react": "^18.2.0", "react-dom": "^18.2.0", "@mui/material": "^5.10.11" } Adjust for your actual versions of course :)

This worked great!

shree1999 commented 2 years ago

Hi @sp00ls thanks for the info One small note the npm version for this to work should be greater then 8.3

dreambold commented 1 year ago

Here is a workaround, add this to your package.json just below the dependencies section:

"overrides": { "react": "^18.2.0", "react-dom": "^18.2.0", "@mui/material": "^5.10.11" } Adjust for your actual versions of course :)

Perfect solution, thanks!