You’re not able to use node’s fs because it is part of nodejs environment . As you surely know your application code is not running on nodejs but rather directly on your smartphone (besides debug mode but even there you cannot use node’s fs package).
Read moreHow do you get file from path in React Native?
“get file from path react native” Code Answer
Read moreHow do I get the file path in React Native?
The most convenient way : Use react-native-document-picker, on selection it will give you a Relative path, something like this content://com.android…… . Pass that Relative path to Stat(filepath) function of the react-native-fetch-blob library. The object will return absolute path.
Read moreCan you use fs in React Native?
You’re not able to use node’s fs because it is part of nodejs environment . As you surely know your application code is not running on nodejs but rather directly on your smartphone (besides debug mode but even there you cannot use node’s fs package).
Read moreHow do I import files into React Native?
Let’s see the different ways we can use the import operation in React Native Application.
Read moreHow do I download files from React Native?
How to download File in React Native using URL
Read more