I am trying to install reactstrap in my react project using commands like "npm i reactstrap react react-dom" or "npm install --save reactstrap react react-dom" but getting error everytime.
I tried to search Stack Overflow but have not found a solution.
Please help.
I am getting the following error:
"npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react#17.0.1
npm ERR! node_modules/react
npm ERR! peer react#">=16.3.2" from #restart/context#2.1.4
npm ERR! node_modules/#restart/context
npm ERR! #restart/context#"^2.1.4" from react-bootstrap#1.4.0
npm ERR! node_modules/react-bootstrap
npm ERR! react-bootstrap#"^1.4.0" from the root project
npm ERR! peer react#"*" from #testing-library/react#11.2.2
npm ERR! node_modules/#testing-library/react
npm ERR! #testing-library/react#"^11.2.2" from the root project
npm ERR! 9 more (prop-types-extra, react-bootstrap, react-dom, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"0.14.x || ^15.0.0 || ^16.0.0" from react-popper#1.3.7
npm ERR! node_modules/reactstrap/node_modules/react-popper
npm ERR! react-popper#"^1.3.6" from reactstrap#8.8.1
npm ERR! node_modules/reactstrap
npm ERR! reactstrap#"*" 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/shashikant/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/shashikant/.npm/_logs/2021-01-02T08_50_48_353Z-debug.log
(base) MacBook-Pro:confusion shashikant$ sudo npm install i reactstrip react react-dom
Password:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/reactstrip - Not found
npm ERR! 404
npm ERR! 404 'reactstrip#*' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/shashikant/.npm/_logs/2021-01-02T08_56_31_508Z-debug.log"
I used "npm install --save-dev reactstrap react react-dom --force" and it solved my problem.
Related
I don't know what happened, but when I tried this command npm i react-typical then I got error like below:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: random#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! node_modules/react-typical
npm ERR! react-typical#"*" 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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2022-08-06T13_20_53_259Z-debug-0.log
Try the following command:
npm install --save --legacy-peer-deps
See details on legacy peer dependancies here.
You can also try:
npm install react-typical --force
If that doesn't work, see this website for other solutions such as downgrading NPM.
I have done in React Js multiple times but it is my first time using axios in React Native. When I install axios through npm install axios it gives a huge log error related to other libraries .
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-native-location-view#0.3.0
npm ERR! Found: react-native-vector-icons#8.1.0
npm ERR! node_modules/react-native-vector-icons
npm ERR! peer react-native-vector-icons#">7.0.0" from react-native-elements#3.4.2
npm ERR! node_modules/react-native-elements
npm ERR! react-native-elements#"^3.4.2" from the root project
npm ERR! peer react-native-vector-icons#"*" from react-native-paper#4.9.2
npm ERR! node_modules/react-native-paper
npm ERR! react-native-paper#"^4.9.2" from the root project
npm ERR! 1 more (the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-vector-icons#"^4.4.3" from react-native-location-view#0.3.0
npm ERR! node_modules/react-native-location-view
npm ERR! react-native-location-view#"^0.3.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native-vector-icons#4.6.0
npm ERR! node_modules/react-native-vector-icons
npm ERR! peer react-native-vector-icons#"^4.4.3" from react-native-location-view#0.3.0
npm ERR! node_modules/react-native-location-view
npm ERR! react-native-location-view#"^0.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\Suyash\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\Suyash\AppData\Local\npm-cache\_logs\2021-12-07T15_22_51_263Z-debug.log
It should have been same as React JS but for some reason these errors are appearing.
This isn't an issue with Axios your dependencies are conflicting because they're out-dated. For example:
Could not resolve dependency:
npm ERR! peer react-native-vector-icons#"^4.4.3" from react-native-location-view#0.3.0
which is trying to pull version 4 and React Native Vector Icons is on version 9. You should update your dependencies and check for any conflicting code accordingly. Would also suggest using Yarn with React Native.
You can run in the terminal:
rm node_modules && rm package-lock.json && yarn install
if you have Yarn installed. If as you stated everything works correctly you could try:
npm i react-native-location-view --legacy-peer-deps
or:
npm i --legacy-peer-deps
When I try to use " npm install", I get below errors, I have read all the possible articles but none of them resolved my issue, I deleted also package-lock.json and also removed node-modules but none of them helped. also used "npm cache verify" before "npm i" but didn't help.
I also used:
npm i --legacy-peer-deps
But it was not helpful.
Any advise is highly appreciated.
code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: your-app#0.1.0
npm ERR! Found: workbox-webpack-plugin#4.3.1
npm ERR! node_modules/workbox-webpack-plugin
npm ERR! workbox-webpack-plugin#"4.3.1" from the root project
npm ERR! workbox-webpack-plugin#"4.3.1" from react-scripts#3.4.4
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"^3.4.3" from the root project
npm ERR! peer react-scripts#">=2.1.3" from react-app-rewired#2.1.8
npm ERR! node_modules/react-app-rewired
npm ERR! peer react-app-rewired#"*" from react-app-rewire-workbox#2.0.1
npm ERR! node_modules/react-app-rewire-workbox
npm ERR! react-app-rewire-workbox#"^2.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer workbox-webpack-plugin#"^3.0.0" from react-app-rewire-workbox#2.0.1
npm ERR! node_modules/react-app-rewire-workbox
npm ERR! react-app-rewire-workbox#"^2.0.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.
npm ERR!
npm ERR! See /Users/afshinshahpari/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/afshinshahpari/.npm/_logs/2021-11-25T16_07_16_430Z-debug.log
I'm getting the following error when I attempt to install a new dependency in my React project:
C:\Users\abhinavverma Desktop Sodexo-Fe Matchiq-fe> npm i #cypress/instrument-cra
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree,
npm ERR! npm ERR! While resolving: match-iq#0.1.0
npm ERR! Found: prettier#1. 19.1
npm ERR! node_modules/prettier
npm ERR! dev prettier#"^1.19.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer prettier#">=2.0.0" from pretty-quick#3.1.1 I
npm ERR! node_modules/pretty-quick
npm ERR! dev pretty-quick#"^3.0.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\abhinavverma 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\abhinavverma\AppData\Local\npm-cache_logs 2021-08-12T18_35_58_522Z-debug.log
run the command again with --force on the end. It can't find the correct version of the dependency. It looks like the version is wrong.
While I am trying to install dependencies for the client, as below, the following errors were shown. What does it mean and how can I resolve it?
npm install axios moment react-file-base64 redux redux-thunk
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: client#0.1.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^15.0.2" from react-file-base64#1.0.3
npm ERR! node_modules/react-file-base64
npm ERR! react-file-base64#"*" 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/owen/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
Answer from my comment:
react-file-base64 depends on react 15, but you depend on react 17. try: a) downgrading or b) running it with --force
The fix: run with --force