F
F
Farazendasss2020-01-28 11:01:32
npm
Farazendasss, 2020-01-28 11:01:32

It knocks out an error about manually linking the project to the module, although there was no manual linking, how to fix the error?

Good day. I want to add the react-native-fs library to my project. Further, according to the documentation, I do the following commands:
npm install react-native-fs --save - download the
react-native link library react-native-fs - write the automatic linking command .
When I run the react-native run-android project , I get the following error:

error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
  - react-native-fs (to unlink run: "react-native unlink react-native-fs")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md


What did I do to fix the error: I
registered the npm uninstall react-native-fs command - to remove the library.
Re-said the library, but did not prescribe the command for linking.
I end up getting the same error.

PS I work with react-native-cli

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alexandrovich, 2020-01-28
@Farazendasss

In order to correctly remove the library, write the commands

react-native unlink react-native-fs
yarn remove react-native-fs

I also noticed this one
IMPORTANT
For RN < 0.57 and/or Gradle < 3 you MUST install react-native-fs at version @2.11.17!

For RN >= 0.57 and/or Gradle >= 3 you MUST install react-native-fs at version >= @2.13.2!

For RN >= 0.61 please install react-native-fs at version >= @2.16.0!

and it seems that this library doesn't have autolinking (react-native link is required) so you'll have to leave this library as it is with this warning box.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question