react#18.2.0 Could not resolve dependency - node.js

I am new in React and trying to build new website using react and material ui, However, I am getting below error when trying to update/install packages from package.json
My npm version : 8.19.3
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-chartjs-2#3.0.4
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! peer react#">=16.8.0" from #emotion/react#11.9.3
npm ERR! node_modules/#emotion/react
npm ERR! peer #emotion/react#"^11.0.0-rc.0" from #emotion/styled#11.9.3
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.8.6
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.8.4
npm ERR! node_modules/#mui/icons-material
npm ERR! 1 more (the root project)
npm ERR! 4 more (#mui/styled-engine, #mui/system, #mui/styled-engine, the root project)
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.8.6
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.8.4
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"5.8.4" from the root project
npm ERR! 1 more (the root project)
npm ERR! 4 more (#mui/styled-engine, #mui/system, #mui/styled-engine, the root project)
npm ERR! peer react#">=16.8.0" from #emotion/styled#11.9.3
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.8.6
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.8.4
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"5.8.4" from the root project
npm ERR! 1 more (the root project)
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/styled-engine#5.8.0
npm ERR! node_modules/#mui/styled-engine
npm ERR! #mui/styled-engine#"5.8.0" from the root project
npm ERR! 3 more (#mui/system, #mui/styled-engine, the root project)
npm ERR! 18 more (#mui/base, #mui/icons-material, #mui/material, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.0" from react-chartjs-2#3.0.4
npm ERR! node_modules/react-chartjs-2
npm ERR! react-chartjs-2#"3.0.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#"^16.8.0 || ^17.0.0" from react-chartjs-2#3.0.4
npm ERR! node_modules/react-chartjs-2
npm ERR! react-chartjs-2#"3.0.4" 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.
npm ERR!
npm ERR! See C:\Users\Admin\AppData\Local\npm-cache\eresolve-report.txt for a full report. </pre> My Package.json
{
"name": "react-ui",
"version": "4.0.0",
"author": "",
"license": "",
"description": "",
"engines": {
"node": "14 || 15 || 16",
"npm": ">=6"
},
"dependencies": {
"#emotion/cache": "11.9.3",
"#emotion/react": "11.9.3",
"#emotion/styled": "11.9.3",
"#mui/icons-material": "5.8.4",
"#mui/material": "5.8.6",
"#mui/styled-engine": "5.8.0",
"#testing-library/jest-dom": "5.16.4",
"#testing-library/react": "13.3.0",
"#testing-library/user-event": "14.2.1",
"chart.js": "3.4.1",
"chroma-js": "2.4.2",
"prop-types": "^15.8.1",
"react": "18.2.0",
"react-chartjs-2": "3.0.4",
"react-countup": "6.3.0",
"react-dom": "18.2.0",
"react-flatpickr": "3.10.13",
"react-router": "^6.8.0",
"react-router-dom": "6.3.0",
"react-scripts": "5.0.1",
"socket.io": "^4.5.4",
"socket.io-client": "^4.5.4",
"stylis": "4.1.1",
"stylis-plugin-rtl": "2.1.1",
"uuid": "8.3.2",
"web-vitals": "2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm
start",
"install:peer-deps": "npm install --legacy-peer-deps"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint": "8.18.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.30.1",
"eslint-plugin-react-hooks": "4.6.0",
"prettier": "2.7.1"
}
}
`

Related

Conflicting peer dependency when trying to Creating runtime environment in heroku

Faild building my app in heroku
i try to build my app in heroku, to create runtime environment it show me this message when it try to push it.
i think the problem is in React versions.
it say that:
Could not resolve dependency.
2.Conflicting peer dependency.
I don't know what i need to update, please help.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: use-reducer-logger#1.0.2
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! react#"^18.2.0" from the root project
npm ERR! peer react#">=16.3.0" from #paypal/react-paypal-js#7.8.1
npm ERR! node_modules/#paypal/react-paypal-js
npm ERR! #paypal/react-paypal-js#"^7.8.1" from the root project
npm ERR! 15 more (#react-aria/ssr, #restart/hooks, #restart/ui, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8" from use-reducer-logger#1.0.2
npm ERR! node_modules/use-reducer-logger
npm ERR! use-reducer-logger#"^1.0.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.8" from use-reducer-logger#1.0.2
npm ERR! node_modules/use-reducer-logger
npm ERR! use-reducer-logger#"^1.0.2" 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.
npm ERR!
npm ERR! See /tmp/npmcache.brFFQ/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.brFFQ/_logs/2022-08-08T12_57_21_020Z-debug-0.log
-----> Build failed
! Push rejected, failed to compile Node.js app.
! Push failed**
i have 3 package.json
this is the front end package.json:
it can be also a problem with the package-lock deps
i don't know ><
{
"name": "frontend",
"proxy": "http://localhost:5000",
"version": "0.1.0",
"private": true,
"dependencies": {
"#paypal/react-paypal-js": "^7.8.1",
"#testing-library/jest-dom": "^5.16.5",
"#testing-library/react": "^13.3.0",
"#testing-library/user-event": "^14.4.2",
"axios": "^0.27.2",
"bootstrap": "^5.2.0",
"react": "^18.2.0",
"react-bootstrap": "^2.5.0",
"react-dom": "^18.2.0",
"react-helmet-async": "^1.3.0",
"react-router-bootstrap": "^0.26.2",
"react-router-dom": "^6.3.0",
"react-scripts": "^5.0.1",
"react-toastify": "^9.0.8",
"use-reducer-logger": "^1.0.2",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
thank u all for help

How to solve upstream dependency conflict (react version 17 didn't work because dependency conflict)

I installed react version 18 but kakao-map-api was not install in 18 version, so I downgrade to react 17.2.0 but it did not work.
I read the error line but I can't understand at all. Do I have to fix all in script tag from package.json file?
For example, testing-library version, emotion/react version? How can I know the version which is fit in react 17? I forcely tried command 'npm install
react-kakao-maps-sdk' in cmd and of course it didn't work for same reason.
I tried downgrade 17 version on command line, and also in package.json but still not work.
Complying from command line, 'fix the upstream dependency conflict', how can I know which version and which library can solve dependency problem?
Here is the error line if I commanded 'npm install react-kakao-maps-sdk'.
npm install react-kakao-maps-sdk
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #testing-library/react#13.3.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#">=16.8.0" from #emotion/react#11.9.3
npm ERR! node_modules/#emotion/react
npm ERR! peer #emotion/react#"^11.0.0-rc.0" from #emotion/styled#11.9.3
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.9.0
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.8.4
npm ERR! node_modules/#mui/icons-material
npm ERR! 1 more (the
root project)
npm ERR! 3 more (#mui/styled-engine, #mui/system, the root project)
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.9.0
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.8.4
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.8.4" from the root project
npm ERR! 1 more (the root project)
npm ERR! 3 more (#mui/styled-engine, #mui/system, the
root project)
npm ERR! peer react#">=16.8.0" from #emotion/styled#11.9.3
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.9.0
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.8.4
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.8.4" from the root project
npm ERR! 1 more (the root project)
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/styled-engine#5.8.7
npm ERR! node_modules/#mui/styled-engine
npm ERR! #mui/styled-engine#"^5.8.7" from #mui/system#5.9.0
npm ERR! node_modules/#mui/system
npm ERR! #mui/system#"^5.9.0" from #mui/material#5.9.0
npm ERR! node_modules/#mui/material
npm ERR! 2 more (#mui/system, the root project)
npm ERR! 12 more (#mui/base, #mui/icons-material, #mui/material, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^18.0.0" from #testing-library/react#13.3.0
npm ERR! node_modules/#testing-library/react
npm ERR! #testing-library/react#"^13.3.0" from the root
project
npm ERR!
npm ERR! Conflicting peer dependency: react#18.2.0
npm ERR! node_modules/react
npm ERR! peer react#"^18.0.0" from #testing-library/react#13.3.0
npm ERR! node_modules/#testing-library/react
npm ERR! #testing-library/react#"^13.3.0" 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.
npm ERR!
npm ERR! See C:\Users\USER\AppData\Local\npm-cache\eresolve-report.txt for a full report.
And here is my package.json file.
{
"name": "songpider-traveling-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"#emotion/react": "^11.9.3",
"#emotion/styled": "^11.9.3",
"#mui/icons-material": "^5.8.4",
"#mui/material": "^5.9.0",
"#testing-library/jest-dom": "^5.16.4",
"#testing-library/react": "^13.3.0",
"#testing-library/user-event": "^13.5.0",
"npm": "^8.15.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router": "^6.3.0",
"react-scripts": "^2.1.3",
"reactstrap": "^9.1.2",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
enter code here
enter code here
npm install --legacy-peer-deps

How to resolve error in eslint-config-airbnb dependencies

I am trying to deploy my reactjs project on heroku; below is the error I got. I have tried using 'npm install --legacy-peer-deps' but it still doesn't work. I have attached my package.json below. Does anyone have any idea about this?
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: eslint-config-airbnb#18.2.1
npm ERR! Found: eslint#8.20.0
npm ERR! node_modules/eslint
npm ERR! peer eslint#"^7.5.0 || ^8.0.0" from #babel/eslint-parser#7.18.2
npm ERR! node_modules/#babel/eslint-parser
npm ERR! #babel/eslint-parser#"^7.16.3" from eslint-config-react-app#7.0.1
npm ERR! node_modules/eslint-config-react-app
npm ERR! eslint-config-react-app#"^7.0.1" from react-scripts#5.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"5.0.1" from the root project
npm ERR! peer eslint#"^6.0.0 || ^7.0.0 || ^8.0.0" from #typescript-eslint/eslint-plugin#5.30.6
npm ERR! node_modules/#typescript-eslint/eslint-plugin
npm ERR! #typescript-eslint/eslint-plugin#"^5.5.0" from eslint-config-react-app#7.0.1
npm ERR! node_modules/eslint-config-react-app
npm ERR! eslint-config-react-app#"^7.0.1" from react-scripts#5.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"5.0.1" from the root project
npm ERR! peerOptional #typescript-eslint/eslint-plugin#"^4.0.0 || ^5.0.0" from eslint-plugin-jest#25.7.0
npm ERR! node_modules/eslint-plugin-jest
npm ERR! eslint-plugin-jest#"^25.3.0" from eslint-config-react-app#7.0.1
npm ERR! node_modules/eslint-config-react-app
npm ERR! eslint-config-react-app#"^7.0.1" from react-scripts#5.0.1
npm ERR! node_modules/react-scripts
npm ERR! 16 more (#typescript-eslint/experimental-utils, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb#18.2.1
npm ERR! node_modules/eslint-config-airbnb
npm ERR! dev eslint-config-airbnb#"^18.2.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint#7.32.0
npm ERR! node_modules/eslint
npm ERR! peer eslint#"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb#18.2.1
npm ERR! node_modules/eslint-config-airbnb
npm ERR! dev eslint-config-airbnb#"^18.2.1" 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.
Below is my package.json, I have the eslint config airbnb in my devDependencies.
package.json:
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"#material-ui/core": "^4.12.4",
"#material-ui/icons": "^4.11.3",
"#material-ui/lab": "^4.0.0-alpha.58",
"axios": "^0.27.2",
"jwt-decode": "^3.1.2",
"material-ui-chip-input": "^1.1.0",
"moment": "^2.29.4",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-file-base64": "^1.0.3",
"react-google-login": "^5.2.2",
"react-redux": "^8.0.2",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"redux": "^4.2.0",
"redux-thunk": "^2.4.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#redux-devtools/core": "^3.9.0",
"#redux-devtools/dock-monitor": "^1.4.0",
"#redux-devtools/log-monitor": "^2.3.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0"
},
"engines": {
"node": "16.x",
"npm": "8.16.0"
}
}

Conflicting Packages in React Project

Just looking to resolve this. I'm quite sure it'll be an easy solve for people used to node packaging errors.
I'm trying to resolve: npm install #material-ui/icons
When using, I receive the following:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #mui/material#5.2.3
npm ERR! Found: react#16.14.0
npm ERR! node_modules/react
npm ERR! react#"^16.13.0" from the root project
npm ERR! peer react#">=16.8.0" from #emotion/react#11.7.0
npm ERR! node_modules/#emotion/react
npm ERR! peer #emotion/react#"^11.0.0-rc.0" from #emotion/styled#11.6.0
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.2.3
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"^5.2.3" from the root project
npm ERR! 3 more (#mui/styled-engine, #mui/system, the root project)
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.2.3
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"^5.2.3" from the root project
npm ERR! 3 more (#mui/styled-engine, #mui/system, the root project)
npm ERR! 11 more (#emotion/styled, #testing-library/react, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^17.0.2" from #mui/material#5.2.3
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"^5.2.3" 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 #mui/material#5.2.3
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"^5.2.3" 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.
npm ERR!
npm ERR! See C:\Users\Nathan\AppData\Local\npm-cache\eresolve-report.txt for a full report.
I've worked back to my yarn.lock package, which has the following. One note, I am not using yarn.
"react#*", "react#^17.0.2", "react#>= 16", "react#>= 16.8.0", "react#>=16.6.0", "react#>=16.8.0", "react#17.0.2":
"integrity" "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA=="
"resolved" "https://registry.npmjs.org/react/-/react-17.0.2.tgz"
"version" "17.0.2"
dependencies:
"loose-envify" "^1.1.0"
"object-assign" "^4.1.1"
It's likely also worth noting my package.json is:
{
"name": "new",
"version": "0.1.0",
"private": true,
"dependencies": {
"#emotion/react": "^11.7.0",
"#emotion/styled": "^11.6.0",
"#fontsource/roboto": "^4.5.1",
"#mui/material": "^5.2.3",
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-scripts": "4.0.3",
"styled-components": "^5.3.3",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

Dependency Issue, React DnD Beautiful [duplicate]

This question already has answers here:
Unable to install react-beautiful-dnd package
(2 answers)
Closed 1 year ago.
I'm trying to install the following package, which is well known.
However, I'm a little confused as to how to diagnose this issue. I'd like to use this package as it's a core concept of my site, drag and drop.
Is this saying I need react #16.14.0? How would I go about bumping the entire project up correctly? Will this cause issues with other packages?
I am quite new to React and specifically this concept of tree dependencies? I also know my packages may be messed up, and if I need to, I'm happy to try resolve with tips.
npm i react-beautiful-dnd
However I get these errors:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: new#0.1.0
npm ERR! Found: react#16.8.0
npm ERR! node_modules/react
npm ERR! peer react#">=16.8.0" from #emotion/react#11.7.0
npm ERR! node_modules/#emotion/react
npm ERR! peer #emotion/react#"^11.0.0-rc.0" from #emotion/styled#11.6.0
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.2.3
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.2.4
npm ERR! node_modules/#mui/icons-material
npm ERR! 1 more (the root project)
npm ERR! 3 more (#mui/styled-engine, #mui/system, the root project)
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.2.3
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.2.4
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.2.4" from the root project
npm ERR! 1 more (the root project)
npm ERR! 3 more (#mui/styled-engine, #mui/system, the root project)
npm ERR! peer react#">=16.8.0" from #emotion/styled#11.6.0
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.2.3
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.2.4
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.2.4" from the root project
npm ERR! 1 more (the root project)
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/styled-engine#5.2.0
npm ERR! node_modules/#mui/styled-engine
npm ERR! #mui/styled-engine#"^5.2.0" from #mui/system#5.2.3
npm ERR! node_modules/#mui/system
npm ERR! #mui/system#"^5.2.3" from #mui/material#5.2.3
npm ERR! node_modules/#mui/material
npm ERR! 2 more (#mui/system, the root project)
npm ERR! 22 more (#material-ui/core, #material-ui/icons, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! react-beautiful-dnd#"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.8.5 || ^17.0.0" from react-beautiful-dnd#13.1.0
npm ERR! node_modules/react-beautiful-dnd
npm ERR! react-beautiful-dnd#"*" 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.
It's worth noting my package.json looks:
{
"name": "new",
"version": "0.1.0",
"private": true,
"dependencies": {
"#emotion/react": "^11.7.0",
"#emotion/styled": "^11.6.0",
"#fontsource/roboto": "^4.5.1",
"#material-ui/icons": "^4.11.2",
"#mui/icons-material": "^5.2.4",
"#mui/material": "^5.2.3",
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"framer-motion": "^4.1.17",
"gsap": "^3.9.1",
"material-ui-search-bar": "^1.0.0",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react-draggable": "^4.4.4",
"react-intersection-observer": "^8.33.1",
"react-scripts": "4.0.3",
"react-typewriter-effect": "^1.1.0",
"styled-components": "^5.3.3",
"typewriter-effect": "^2.18.2",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Is this saying I need react #16.14.0? How would I go about bumping the entire project up correctly? Will this cause issues with other packages?
Maybe your problem could be solved by removing the node_modules folder and running npm -g install npm, like this tutorial suggest: Unable to install react-beautiful-dnd package

Resources