unable to install material-table with below package.json version
Error: npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: @types/[email protected] npm ERR! node_modules/@types/react npm ERR! dev @types/react@"^18.2.14" from the root project npm ERR! peerOptional @types/react@"^17.0.0 || ^18.0.0" from @mui/[email protected] npm ERR! node_modules/@mui/lab npm ERR! peer @mui/lab@"^5.0.0-alpha.72" from [email protected] npm ERR! node_modules/material-table npm ERR! material-table@"" from the root project npm ERR! 1 more (@mui/material) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peerOptional @types/react@"^16.8.6 || ^17.0.0" from @mui/[email protected] npm ERR! node_modules/@mui/styles npm ERR! peer @mui/styles@"5.5.0" from [email protected] 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.
this issue can be solved with --force or --legacy-peer-deps but will get vulnerabilities that is not suggested approach
pacakge.json: { "name": "dummy", "version": "0.1.0", "private": true, "babel": { "presets": [ "next/babel", "@babel/preset-react" ] }, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint", "test": "jest" }, "dependencies": { "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@fontsource/poppins": "^4.5.10", "@mui/material": "^5.13.6", "@mui/styled-engine-sc": "^5.12.0", "autoprefixer": "10.4.14", "eslint": "8.43.0", "eslint-config-next": "13.4.7", "next": "13.4.7", "next-intl": "^2.17.5", "postcss": "^8.4.24", "react": "^18.2.0", "react-dom": "^18.2.0", "styled-components": "^5.3.11", "tailwindcss": "^3.3.2", "typescript": "^5.1.3" }, "devDependencies": { "@babel/preset-react": "^7.22.5", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^14.0.0", "@types/jest": "^29.5.2", "@types/node": "^20.3.1", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", "@types/styled-components": "^5.1.26", "babel-jest": "^29.6.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.5.0", "jest-environment-jsdom": "^29.6.0", "ts-jest": "^29.1.1" } }
I'm also having the same problem. Looks like the same issue as #3209
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.