Search code examples
react-nativenpmdependencies

React-native-fs peer dependency with RN?


npm WARN [email protected] requires a peer of react-native@^0.59.5 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-native-windows@^0.57.2 but none is installed. You must install peer dependencies yourself.

When I run npm install these two warning appear. I know that I can solve the second by running npm install react-native-windows but I am not sure how to fix the first one.

I currently have react-native 0.63.3 running. If I try to downgrade to 0.59.5 I get a host of other issues.

Here on the react-native-fs npmjs instructions it lists that this version of reat-native-fs should be used for RN > 0.61 which only adds to my confusion as to why this isn't working.react-native-fs npmjs instructions

I can provide any other files that may be of importance. Thank you for the help!


Solution

  • I did "npm install --save react-native-fs --legacy-peer-deps" and "react-native link react-native-fs"

    And the module works fine for me.