ERROR Installing npm install react-base64-downloader - reactjs

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-native#0.70.5
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! peer react#"^18.2.0" from react-dom#18.2.0
npm ERR! node_modules/react-dom
npm ERR! react-dom#"^18.2.0" from the root project
npm ERR! peer react-dom#">=15.0.1" from react-base64-downloader#2.1.7
npm ERR! node_modules/react-base64-downloader
npm ERR! react-base64-downloader#"" from the root project
npm ERR! peer react#">=16.13.1" from react-native-permissions#3.6.1
npm ERR! node_modules/react-native-permissions
npm ERR! react-native-permissions#"^3.6.1" from the root project
npm ERR! 5 more (react-native-webview, react-shallow-renderer, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"18.1.0" from react-native#0.70.5
npm ERR! node_modules/react-native
npm ERR! peer react-native#"" from react-native-android-permissions#1.0.2
npm ERR! node_modules/react-native-android-permissions
npm ERR! react-native-android-permissions#"^1.0.2" from the root project
npm ERR! peer react-native#"" from react-native-fs#2.20.0
npm ERR! node_modules/react-native-fs
npm ERR! react-native-fs#"^2.20.0" from the root project
npm ERR! 4 more (react-native-permissions, react-native-root-toast, ...)
npm ERR!
npm ERR! Conflicting peer dependency: react#18.1.0
npm ERR! node_modules/react
npm ERR! peer react#"18.1.0" from react-native#0.70.5
npm ERR! node_modules/react-native
npm ERR! peer react-native#"" from react-native-android-permissions#1.0.2
npm ERR! node_modules/react-native-android-permissions
npm ERR! react-native-android-permissions#"^1.0.2" from the root project
npm ERR! peer react-native#"*" from react-native-fs#2.20.0
npm ERR! node_modules/react-native-fs
npm ERR! react-native-fs#"^2.20.0" from the root project
npm ERR! 4 more (react-native-permissions, react-native-root-toast, ...)
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.
How to fix this issue ?.
I am using react#18.2.0, react-dom#18.2.0
& this is my package.json
//package.json//
"dependencies": {
"expo": "~47.0.3",
"expo-file-system": "^15.1.1",
"expo-media-library": "^15.0.0",
"expo-status-bar": "~1.4.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-native": "0.70.5",
"react-native-android-permissions": "^1.0.2",
"react-native-fetch-blob": "^0.10.8",
"react-native-fs": "^2.20.0",
"react-native-permissions": "^3.6.1",
"react-native-root-siblings": "^4.1.1",
"react-native-root-toast": "^3.3.1",
"react-native-webview": "^11.23.1",
"rn-fetch-blob": "^0.12.0"
}

Related

React NPM Error - code ERESOLVE, ERESOLVE could not resolve

In my react-native app, When I try to install npm i google-spreadsheet --save I get below error.
How to fix it ?
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-dom#18.2.0
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! peer react#"18.1.0" from react-native#0.70.6
npm ERR! node_modules/react-native
npm ERR! peerOptional react-native#">=0.59" from react-redux#8.0.5
npm ERR! node_modules/react-redux
npm ERR! react-redux#"^8.0.5" from the root project
npm ERR! react-native#"0.70.6" from the root project
npm ERR! peer react#"^16.8 || ^17.0 || ^18.0" from react-redux#8.0.5
npm ERR! node_modules/react-redux
npm ERR! react-redux#"^8.0.5" from the root project
npm ERR! 4 more (react-shallow-renderer, react-test-renderer, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^18.2.0" from react-dom#18.2.0
npm ERR! node_modules/react-dom
npm ERR! peerOptional react-dom#"^16.8 || ^17.0 || ^18.0" from react-redux#8.0.5
npm ERR! node_modules/react-redux
npm ERR! react-redux#"^8.0.5" 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.2.0" from react-dom#18.2.0
npm ERR! node_modules/react-dom
npm ERR! peerOptional react-dom#"^16.8 || ^17.0 || ^18.0" from react-redux#8.0.5
npm ERR! node_modules/react-redux
npm ERR! react-redux#"^8.0.5" 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\harry\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\harry\AppData\Local\npm-cache\_logs\2023-02-06T05_01_54_912Z-debug-0.log

I want to install react router dom using "npm install react-router-dom" but I am getting the errors which i don't know how to solve.?

PS C:\ReactP\sample> npm install react-router-dom
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #material-ui/core#4.12.4
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! peer react#">=16.8.0" from #emotion/react#11.10.4
npm ERR! node_modules/#emotion/react
npm ERR! peer #emotion/react#"^11.0.0-rc.0" from #emotion/styled#11.10.4
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.10.3
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.10.3
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.10.3
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.10.3
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.10.3" 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.10.4
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.10.3
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.10.3
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.10.3" from the root project
npm ERR! 1 more (the root project)
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/styled-engine#5.10.3
npm ERR! node_modules/#mui/styled-engine
npm ERR! #mui/styled-engine#"^5.10.3" from #mui/system#5.10.3
npm ERR! node_modules/#mui/system
npm ERR! #mui/system#"^5.10.3" from #mui/material#5.10.3
npm ERR! node_modules/#mui/material
npm ERR! 2 more (#mui/system, the root project)
npm ERR! 14 more (#emotion/use-insertion-effect-with-fallbacks, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.0" from #material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! peer #material-ui/core#"^4.0.0" from #material-ui/icons#4.11.3
npm ERR! node_modules/#material-ui/icons
npm ERR! #material-ui/icons#"^4.11.3" from the root project
npm ERR! #material-ui/core#"^4.12.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 #material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! peer #material-ui/core#"^4.0.0" from #material-ui/icons#4.11.3
npm ERR! node_modules/#material-ui/icons
npm ERR! #material-ui/icons#"^4.11.3" from the root project
npm ERR! #material-ui/core#"^4.12.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\Ankit\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ankit\AppData\Local\npm-cache\_logs\2022-12-16T07_10_31_536Z-debug-0.log
PS C:\ReactP\sample>
I tried installation using --save, --force but failed to install
Try to install it as:
npm i react-router-dom --legacy-peer-deps
Try using this command for v6
npm i react-router-dom --force

npm install on React project produces ERESOLVE

I had been attempting to update dependencies on an old project recently. Within my package.json file - I outline my npm and node version, as well as the dependencies I'm using:
"engines": {
"npm": "9.x",
"node": "14.x"
},
"dependencies": {
"isomorphic-fetch": "^3.0.0",
"jquery": "^3.3.1",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-google-charts": "^1.6.6",
"react-scripts": "^2.1.3",
"react-select": "^1.3.0",
"react-toggle-display": "^2.2.0",
"react-tooltip": "^3.8.4",
"react-transition-group": "^4.4.5",
"survey-react": "^0.12.36"
}
When I run npm install; however, I'm met with a litany of errors regarding the packages I'm using.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-transition-group#4.4.5
npm ERR! Found: react#16.5.2
npm ERR! node_modules/react
npm ERR! react#"^16.5.2" from the root project
npm ERR! peer react#"^16.0.0" from react-dom#16.5.2
npm ERR! node_modules/react-dom
npm ERR! react-dom#"^16.5.2" from the root project
npm ERR! peer react-dom#">=15.0.0" from react-google-charts#1.6.6
npm ERR! node_modules/react-google-charts
npm ERR! react-google-charts#"^1.6.6" from the root project
npm ERR! 2 more (react-select, react-tooltip)
npm ERR! 4 more (react-google-charts, react-input-autosize, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#">=16.6.0" from react-transition-group#4.4.5
npm ERR! node_modules/react-transition-group
npm ERR! react-transition-group#"^4.4.5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#18.2.0
npm ERR! node_modules/react
npm ERR! peer react#">=16.6.0" from react-transition-group#4.4.5
npm ERR! node_modules/react-transition-group
npm ERR! react-transition-group#"^4.4.5" from the root project
I'm unsure what steps I should take to resolve this. Is this an issue with the version of react I'm currently using?

Error when installing material ui in react

I am trying to use material ui core but I am getting an error when installing it with npm in a react and typescript application.
The command I used in the root of the project is:
npm install #mui/material #emotion/react #emotion/styled
Material UI website
The error I got is:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #mui/core#5.0.0-alpha.54
npm ERR! Found: #types/react#18.0.15
npm ERR! node_modules/#types/react
npm ERR! peerOptional #types/react#"^17.0.0 || ^18.0.0" from #mui/base#5.0.0-alpha.95
npm ERR! node_modules/#mui/base
npm ERR! #mui/base#"5.0.0-alpha.95" from #mui/material#5.10.3
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"^5.10.3" from the root project
npm ERR! 1 more (#mui/icons-material)
npm ERR! peerOptional #types/react#"^17.0.0 || ^18.0.0" from #mui/icons-material#5.10.3
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.10.3" from the root project
npm ERR! 9 more (#mui/private-theming, #mui/system, #mui/types, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional #types/react#"^16.8.6 || ^17.0.0" from #mui/core#5.0.0-alpha.54
npm ERR! node_modules/#mui/core
npm ERR! #mui/core#"^5.0.0-alpha.54" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #types/react#17.0.49
npm ERR! node_modules/#types/react
npm ERR! peerOptional #types/react#"^16.8.6 || ^17.0.0" from #mui/core#5.0.0-alpha.54
npm ERR! node_modules/#mui/core
npm ERR! #mui/core#"^5.0.0-alpha.54" 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 /Users/username/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/username/.npm/_logs/2022-09--debug-0.log
user#User'sPC projectName % npm install #mui/material #emotion/react #emotion/styled
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #mui/core#5.0.0-alpha.54
npm ERR! Found: #types/react#18.0.15
npm ERR! node_modules/#types/react
npm ERR! peerOptional #types/react#"^17.0.0 || ^18.0.0" from #mui/base#5.0.0-alpha.95
npm ERR! node_modules/#mui/base
npm ERR! #mui/base#"5.0.0-alpha.95" from #mui/material#5.10.3
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"^5.10.3" from the root project
npm ERR! 1 more (#mui/icons-material)
npm ERR! peerOptional #types/react#"^17.0.0 || ^18.0.0" from #mui/icons-material#5.10.3
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.10.3" from the root project
npm ERR! 9 more (#mui/private-theming, #mui/system, #mui/types, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional #types/react#"^16.8.6 || ^17.0.0" from #mui/core#5.0.0-alpha.54
npm ERR! node_modules/#mui/core
npm ERR! #mui/core#"^5.0.0-alpha.54" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #types/react#17.0.49
npm ERR! node_modules/#types/react
npm ERR! peerOptional #types/react#"^16.8.6 || ^17.0.0" from #mui/core#5.0.0-alpha.54
npm ERR! node_modules/#mui/core
npm ERR! #mui/core#"^5.0.0-alpha.54" 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 /Users/username/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/username/.npm/_logs/2022-09-debug-0.log
My relevant package.json is:
"dependencies": {
"#emotion/react": "^11.10.4",
"#emotion/styled": "^11.10.4",
"#mui/core": "^5.0.0-alpha.54",
"#mui/icons-material": "^5.10.3",
"#mui/material": "^5.10.3",
"#mui/styled-engine-sc": "^5.10.3",
},
I removed the #mui/core dependency and then tried the command: npm i --save #mui/core as suggested by the answer in the comment, however I got the following error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving:projectname#0.1.0
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! react#"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^17.0.2" from #mui/core#5.0.0-alpha.54
npm ERR! node_modules/#mui/core
npm ERR! #mui/core#"^5.0.0-alpha.54" 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 /Users/username/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/username/.npm/_logs/2022-09--debug-0.log
I have no idea what this error means so would appreciate any help thanks!
Run these command
npm config set legacy-peer-deps true
npm i --save #mui/core
npm i #mui/styles

Dependencies conflict with react#17.0.2 #apollo/react-common#3.1.4

I am using #apollo in my react project and I keep getting this error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #apollo/react-common#3.1.4
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR! peerOptional react#"^16.8.0 || ^17.0.0 || ^18.0.0" from #apollo/client#3.6.8
npm ERR! node_modules/#apollo/client
npm ERR! #apollo/client#"^3.6.8" from the root project
npm ERR! #apollo/client#"latest" from #apollo/react-components#4.0.0
npm ERR! node_modules/#apollo/react-components
npm ERR! #apollo/react-components#"^4.0.0" from the root project
npm ERR! 1 more (#apollo/react-hooks)
npm ERR! 18 more (#emotion/react, #material-ui/core, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0" from #apollo/react-common#3.1.4
npm ERR! node_modules/#apollo/react-common
npm ERR! #apollo/react-common#"^3.1.4" from the root project
npm ERR! #apollo/react-common#"^3.1.4" from #apollo/react-ssr#3.1.5
npm ERR! node_modules/#apollo/react-ssr
npm ERR! #apollo/react-ssr#"^3.1.5" from react-apollo#3.1.5
npm ERR! node_modules/react-apollo
npm ERR! react-apollo#"^3.1.5" from the root project
npm ERR! 5 more (#apollo/react-hooks, react-apollo, ...)
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.8.0" from #apollo/react-common#3.1.4
npm ERR! node_modules/#apollo/react-common
npm ERR! #apollo/react-common#"^3.1.4" from the root project
npm ERR! #apollo/react-common#"^3.1.4" from #apollo/react-ssr#3.1.5
npm ERR! node_modules/#apollo/react-ssr
npm ERR! #apollo/react-ssr#"^3.1.5" from react-apollo#3.1.5
npm ERR! node_modules/react-apollo
npm ERR! react-apollo#"^3.1.5" from the root project
npm ERR! 5 more (#apollo/react-hooks, react-apollo, ...)
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 /home/runner/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2022-06-17T09_09_33_753Z-debug-0.log
make: *** [Makefile:35: node_modules] Error 1
Error: Process completed with exit code 2.
I tried to use the --legacy-peer-deps but in vain.
JFY, I am using these dependencies
"#apollo/client": "^3.6.8"
"#apollo/react-common": "^3.1.4"
"#apollo/react-components": "^4.0.0"
"#apollo/react-hooks": "^4.0.0"
"react": "^17.0.2"
You should downgrade your react version to react#"^16.8.0" in package.json because #apollo/react-common#3.1.4 reports is incompatible with 17. You must wait until they upgrade or remove the package.

Resources