Im trying to install #tsamantanis/react-glassmorphism in my project.
npm install --save #tsamantanis/react-glassmorphism
and i see this
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: cpprojectmovie#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.1" from #tsamantanis/react-glassmorphism#1.1.2
npm ERR! node_modules/#tsamantanis/react-glassmorphism
npm ERR! #tsamantanis/react-glassmorphism#"*" 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\mintam\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\mintam\AppData\Local\npm-cache\_logs\2022-09-22T03_24_18_239Z-debug-0.log
please help me to find the solution. thank you in advance
The punchline is this:
npm ERR! peer react#"^17.0.1" from #tsamantanis/react-glassmorphism#1.1.2
Peer dependency means the package you're trying to install expects the "peer" (in this case react#"^17.0.1 package) to be in the same project.
This means the package you're trying to install react-glassmorphism's latest version 1.1.2 expects your React version to be at least v17.
The solution is either upgrading your project's React version to v17, or installing an older version of react-glassmorphism package.
Look at the version history of the package and find the version that supports earlier version of React and install it:
npm i --save react-glassmorphism#<version here>
Related
When I try to install the react-burger-menu thingy on react using the npm install react-burger --save, it gives out this error and I cannot continue my project:
npm ERR! While resolving: MYPROJECT
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#">=0.14.0 <17.0.0" from react-burger-menu#2.9.2
npm ERR! node_modules/react-burger-menu
npm ERR! react-burger-menu#"2.9.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!
How can I successfully install the burger menu?
Thanks in advance.
Package You're trying to download in only available for react version lesser than or equal to 17. You can use this package by downgrading from React 18 to React 17 by,
npm install react#17.0.0 react-dom#17.0.0
Or alternatively :
You can use another package for react burger thing ;-). May be I can help for alternate package ?
i can't install swagger in my nestjs application. When I try, I get a Error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test.api#0.0.1
npm ERR! Found: #nestjs/common#8.4.7
npm ERR! node_modules/#nestjs/common
npm ERR! #nestjs/common#"^8.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #nestjs/common#"^9.0.0" from #nestjs/swagger#6.0.1
npm ERR! node_modules/#nestjs/swagger
npm ERR! dev #nestjs/swagger#"*" 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\Jakub\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\Jakub\AppData\Local\npm- cache\_logs\2022-07-10T11_03_48_876Z-debug-0.log
How to resolve this?
NestJS 9 was recently released (2 days ago).
https://trilon.io/blog/nestjs-9-is-now-available.
Changes have been made to the #nestjs/swagger package. You are installing the latest version which has peer dependencies on NestJS 9 while your project is still on version 8.4.7.
The error is saying it cannot resolve the requested peer dependency #nestjs/common#^9.0.0. It does find #nestjs/common#8.4.7 instead, but that's not compatible.
Either upgrade NestJS or install an older version of the #nestjs/swagger package that is compatible with the NestJS version your application uses. Version 5.2.1 should work for you.
yarn add #nestjs/swagger#5.2.1
OR
npm i #nestjs/swagger#5.2.1
C:\reactcamp\camp-project> npm install semantic-ui-react semantic-ui-css
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: camp-project#0.1.0
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! react#"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.0" from semantic-ui-react#2.1.2
npm ERR! node_modules/semantic-ui-react
npm ERR! semantic-ui-react#"^2.1.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 C:\Users\zekis\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\zekis\AppData\Local\npm-cache\_logs\2022-05-01T18_07_14_536Z-debug-0.log
TLDR:
semantic-ui-react#2.1.2 is incompatible with React 18. As a workaround, you can downgrade your application to React 17.
While resolving: camp-project#0.1.0
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! react#"^18.0.0" from the root project
Those first three lines indicate that npm identified React 18 as your project's dependency.
Could not resolve dependency
npm ERR! peer react#"^16.8.0 || ^17.0.0" from semantic-ui-react#2.1.2
npm ERR! node_modules/semantic-ui-react
npm ERR! semantic-ui-react#"^2.1.2" from the root project
These 3 lines list semantic-ui-react's peer dependency, meaning it expects your project to have either React 16.8 or React 17 as dependency.
Fix the upstream dependency conflict
There are two ways to address this conflict:
Downgrade your project to React 17 using npm install react#17
Override semantic-ui-react's using yarn's Selective Resolution feature. Inside your package.json:
"resolutions": {
"semantic-ui-react/react": "^18.0.0"
}
You can use this article it helped me solved the same problem when i wanted to install semantic-ui with react 18 it will probably help you with other frameworks that doesn't compatible with react 18
I just cloned a React application from Git that doesn't have node_modules on it. I try to install with command npm install but unable to do it. Following error occurs when installing the npm.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: fuse-react-app#2.0.0
npm ERR! Found: date-fns#2.0.0-alpha.26
npm ERR! node_modules/date-fns
npm ERR! date-fns#"2.0.0-alpha.26" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer date-fns#"2.0.0-alpha.21" from #date-io/date-fns#1.0.1
npm ERR! node_modules/#date-io/date-fns
npm ERR! #date-io/date-fns#"1.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 C:\Users\...\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\...\AppData\Local\npm-cache\_logs\2022-04-24T12_44_19_589Z-debug-0.log
I even tried with npm install --legacy-peer-deps but doesn't work. How can I fix this issue?
TL;DR
A possible solution to this problem is setting the version of date-fns to 2.0.0-alpha.21.
Full Answer
To fix your issue, you can change the version of date-fns.
To do this, follow these steps.
In package.json, edit the version of date-fns with the following:
{
"dependencies": {
"date-fns": "2.0.0-alpha.21"
}
}
Save the package.json file, and run the following command in the same directory as package.json.
$ npm install
Your dependencies should install successfully.
Conclusion
In conclusion, you need to change the version of date-fns to 2.0.0-alpha.21.
as the title suggests I'm trying to install DateTimePicker and I get this error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: react#16.13.1
npm ERR! node_modules/react
npm ERR! react#"16.13.1" from the root project
npm ERR! peer react#">=16.8.3" from #react-native-community/datetimepicker#3.0.4
npm ERR! node_modules/#react-native-community/datetimepicker
npm ERR! #react-native-community/datetimepicker#"3.0.4" from the root project
npm ERR! 1 more (react-native)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.1" from react-native-windows#0.64.5
npm ERR! node_modules/react-native-windows
npm ERR! peer react-native-windows#">=0.62" from #react-native-community/datetimepicker#3.0.4
npm ERR! node_modules/#react-native-community/datetimepicker
npm ERR! #react-native-community/datetimepicker#"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\robbi\AppData\Local\npm-cache\eresolve-report.txt for a full report.
How can I do?
Sorry for the stupid question but I'm still studying ..
If you are using expo download your dependency through
expo install #react-native-community/datetimepicker
If you have used yarn or npm for that some dependencies might have a conflict with each other (because of incompatibility issues) whereas through expo install it will install the respective version of the package according to your expo version