Can't install with NPM, unable to resolve dependency tree
See original GitHub issueEnvironment
System:
OS: Windows 10 10.0.22000
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 3.65 GB / 15.93 GB
Binaries:
Node: 16.7.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 7.20.3 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 29, 30, 31
Build Tools: 29.0.2, 30.0.2, 31.0.0
System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7621141
Visual Studio: 16.10.31515.178 (Visual Studio Community 2019)
Languages:
Java: 1.8.0_302
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.1 => 0.64.1
react-native-windows: Not Found
npmGlobalPackages:
*react-native*: Not Found
Description
I’ve tried to install this module with npm install @react-native-community/slider
but got an ERESOLVE message below.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app@0.9.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"17.0.1" from the root project
npm ERR! peer react@"*" from @react-native-community/slider@4.1.9
npm ERR! node_modules/@react-native-community/slider
npm ERR! @react-native-community/slider@"*" from the root project
npm ERR! 1 more (react-native)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.2" from react-native-windows@0.66.1
npm ERR! node_modules/react-native-windows
npm ERR! peer react-native-windows@"*" from @react-native-community/slider@4.1.9
npm ERR! node_modules/@react-native-community/slider
npm ERR! @react-native-community/slider@"*" 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.
I’ve also tried to install it with --force
option but it crashes the app whenever I try to render a slider.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Unable to resolve dependency tree error when installing npm ...
You have dependency conflict (incorrect and potentially broken dependency) as it says, so try to run the command with --force , or --legacy-peer ......
Read more >Unable to resolve dependency tree error in Angular while ...
To fix Unable to resolve dependency tree error in Angular while installing `npm` packages follow the below steps. 1. Run `npm install --save ......
Read more >ERESOLVE unable to resolve dependency tree when npm ...
Remove node_modules folder and package-lock. · Run npm install –force instead of npm install command · if you got the same error, try...
Read more >"Unable to resolve dependency tree" error during NPM install ...
Delete node_module folder and the package-lock.json file. · Run npm cache verify to verify and clean up your npm. · Run npm install...
Read more >unable to resolve dependency tree angular - You.com
You have dependency conflict (incorrect and potentially broken dependency) as it says, so try to run the command with --force , or --legacy-peer-deps...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@BartoszKlonowski I was able to install it without any errors using yarn. I leave the environment information in case it may be useful.
I’ve never actually thought about updating npm. It worked when I passed
--legacy-peer-deps
. I’ll try to create a new project to check if a newer npm version fixes the issue.