React-native-fs: unbale to install react-native-fs [ERESOLVE unable to resolve dependency tree]

Created on 15 Dec 2020  Â·  10Comments  Â·  Source: itinance/react-native-fs

I am trying to install this library but it's not installing.

npm install react-native-fs

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native
npm ERR! react-native@"0.63.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.59.5" from [email protected]
npm ERR! node_modules/react-native-fs
npm ERR! react-native-fs@"*" 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/alirehman/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alirehman/.npm/_logs/2020-12-15T06_24_41_085Z-debug.log

System Information
System: OS: macOS 11.0.1 CPU: (4) x64 Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz Memory: 105.44 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.18.0 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.0.10 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1 Android SDK: API Levels: 23, 26, 28, 29, 30 Build Tools: 28.0.3, 29.0.2, 30.0.2 System Images: android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.6953283 Xcode: 12.2/12B45b - /usr/bin/xcodebuild Languages: Java: 1.8.0_275 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found

Most helpful comment

add --legacy-peer-deps flag

npm install react-native-fs --save --legacy-peer-deps

All 10 comments

by using yarn it is installed but with this warning
warning " > [email protected]" has incorrect peer dependency "react-native@^0.59.5".

Same problem :/ any idea?

@mapsi-fixi You can use yarn instead of npm

I have resolved it for npm by following these steps.

  1. Delete package-lock.json file
  2. Delete yarn.lock file
  3. Delete node_module folder
  4. Close all your terminals/cmds
  5. Close IDEs (Android Studio or Xcode)
  6. Then try to run npm install

i have same problem. anyone can help?

add --legacy-peer-deps flag

npm install react-native-fs --save --legacy-peer-deps

Great thanks a lot!

On Thu, Jan 28, 2021 at 7:53 PM Maron Balinas notifications@github.com
wrote:

add --legacy-peer-deps flag

npm install react-native-fs --save --legacy-peer-deps

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/itinance/react-native-fs/issues/968#issuecomment-769135759,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH5C37EKEIXYRB232NT6ZR3S4F25ZANCNFSM4U32Z77Q
.

I also upgraded to node15, and always need to attach this flag --legacy-peer-deps flag.
Just wondering if it's permanently needed.
Or should I just downgrade to node14, which the same problem is non-existent?

I'm using the LTS version of node 12.18.0, Now there is no need to use --legacy-peer-deps flag

I am getting this error when i tried to install react scripts using following command
npm install react-scripts -save

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: react@undefined
npm ERR! node_modules/react
npm ERR! react@"file:react" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@">= 16" from [email protected]
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@"*" 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\LENOVO\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\LENOVO\AppData\Local\npm-cache_logs\2021-03-16T12_23_12_135Z-debug.log

system details:
windows 10
32 bit operating system
6 GB RAM

@Amru678 You can try :
npm install react-scripts -save --legacy-peer-deps

or

npm install react-scripts -save --force

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zaheerahmad92001 picture zaheerahmad92001  Â·  3Comments

crobinson42 picture crobinson42  Â·  4Comments

MuppaAkhil picture MuppaAkhil  Â·  3Comments

CesarLanderos picture CesarLanderos  Â·  4Comments

duckmyanmar picture duckmyanmar  Â·  3Comments