I want to add reactstrap and bootstrap to React Web Coding - reactjs

I want to add reactstrap and bootstrap to React Web Coding.
In a new terminal window I typed npm install reactstrap and npm install bootstrap
and I get this error:
C:\reactcourse\intro>npm install reactstrap
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependenc
npm ERR!
npm ERR! Found: react#17.0.1
npm ERR! node_modules/react
npm ERR! peer react#"*" from #testing-libra
npm ERR! node_modules/#testing-library/reac
npm ERR! #testing-library/react#"^11.2.2"
npm ERR! peer react#"17.0.1" from react-dom
npm ERR! node_modules/react-dom
npm ERR! peer react-dom#"*" from #testing
npm ERR! node_modules/#testing-library/re
npm ERR! #testing-library/react#"^11.2.
npm ERR! react-dom#"^17.0.1" from the roo
npm ERR! 1 more (reactstrap)
npm ERR! 2 more (the root project, reactstr
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"0.14.x || ^15.0.0 || ^16
npm ERR! node_modules/reactstrap/node_modules
npm ERR! react-popper#"^1.3.6" from reactst
npm ERR! node_modules/reactstrap
npm ERR! reactstrap#"*" from the root pro
npm ERR!
npm ERR! Fix the upstream dependency conflict
npm ERR! this command with --force, or --lega
npm ERR! to accept an incorrect (and potentia
npm ERR!
npm ERR! See C:\Users\emrec\AppData\Local\npm
npm ERR! A complete log of this run can be fo
npm ERR! C:\Users\emrec\AppData\Local\npm

It's caused by the fact that reactstrap uses the v1 of react-popper which is not compatible with the version of react you use (#^17.0.1).
You should either consider using a minor version of react or as I would advise you, consider using another UI component library like material or another more "actual" UI lib.

Related

npm ERR code ERESOLVE facing this issue while trying to install react packages

I have materials-ui already installed and when i tried to install other react packages im getting this error and nothing related to npm is working properly please help
PS
C:\Users\panna\OneDrive\Desktop\forms\google_form> npm install #mui/lab
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#"^17.0.0 || ^18.0.0" from #mui/base#5.0.0-alpha.105
npm ERR! node_modules/#mui/base
npm ERR! #mui/base#"5.0.0-alpha.105" from #mui/material#5.10.13
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"^5.10.13" from the root project
npm ERR! 1 more (#mui/lab)
npm ERR! #mui/base#"5.0.0-alpha.105" from #mui/lab#5.0.0-alpha.107
npm ERR! node_modules/#mui/lab
npm ERR! #mui/lab#"*" from the root project
npm ERR! peer react#"^17.0.0 || ^18.0.0" from #mui/material#5.10.13
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"^5.10.13" from the root project
npm ERR! peer #mui/material#"^5.0.0" from #mui/lab#5.0.0-alpha.107
npm ERR! node_modules/#mui/lab
npm ERR! #mui/lab#"*" from the root project
npm ERR! 11 more (#mui/private-theming, #mui/styled-engine, #mui/system, ...)
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! 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\panna\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\panna\AppData\Local\npm-cache\_logs\2022-11-13T18_48_18_070Z-debug-0.log
og
I tried uninstalling materials ui and many more thing whatever was availble on the net but couldnt find anything similar , it is my first time using reacts packages please help
This is because you are using React 18 with MUI v4
you can choose one of these approaches:
Update your MUI to v5
or
Downgrade your React Version to 17
or if you want to keep these version just simply use this flag --legacy-peer-deps
for example: npm install #mui/lab --legacy-peer-deps
then you can install everything
But Preferably Update your MUI to version 5.

Installing #mui/material results in dependency conflict

I am trying to install #mui/material
npm install #mui/material
But, when I do it throws this error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: paper-kit-react#1.0.0
npm ERR! Found: react#16.8.6
npm ERR! node_modules/react
npm ERR! react#"16.8.6" from the root project
npm ERR! peer react#">=16.8.0" from #emotion/react#11.10.4
npm ERR! node_modules/#emotion/react
npm ERR! #emotion/react#"^11.10.4" from the root project
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.10.5
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"*" from the root project
npm ERR! 1 more (#emotion/styled)
npm ERR! 1 more (#emotion/styled)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^17.0.0 || ^18.0.0" from #mui/material#5.10.5
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"*" 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 /home/pc/.npm/eresolve-report.txt for a full report.
Any idea what's going on?
As I can see you are using React Version 16.8.6 .
You need at least React Version >= 17.0.0 as you can read in the MUI docs.
I hope this solves your problem.

Problem while installing MUI, and importing MUI components

home#Avinashs-MacBook-Pro archit-website % npm install #material-ui/core
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: archit-website#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#"^16.8.0 || ^17.0.0" from #material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"*" 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/home/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/home/.npm/_logs/2022-07-19T00_13_51_943Z-debug-0.log
I was trying to install material UI through my terminal, but it doesn't really install showing up some error. I am unsure of how I could solve this error. Kindly Suggest.

Couldn't install Axios in React Native via npm install axios

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

npm ERR, when i npm install react-pin-input --save

PS E:\ناهور کلون\nahoorclone\nohour> npm install react-pin-input --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: nahor#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#"^0.14.0 || ^15.4.2 || ^16.2.0" from react-pin-input#1.0.1
npm ERR! node_modules/react-pin-input
npm ERR! react-pin-input#"*" 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\2021-12-07T12_44_04_659Z-debug.log
my npm is the latest version but I get this error. what is the problem? how can I install react-pin-input?
Looks like your using React 17 and react-pin-input doesn't support 17 yet. You'll need to downgrade your react version to 16 to use that npm package.

Resources