react-native-fs
react-native-fs copied to clipboard
TypeError: Cannot read property 'RNFSFileTypeRegular' of null
Hello,
I have followed the instructions in the " Usage (Android)" section , then I inserted in my App.js, in the App function, these two lines:
const App: () => Node = () => {
var RNFS = require('react-native-fs');
var path = RNFS.DocumentDirectoryPath + '/test.txt';
....
but when I run:
npx react-native start
I get
TypeError: Cannot read property 'RNFSFileTypeRegular' of null, js engine: hermes
I really don't know what to do, any lead ?
Thanks a lot
the same error
same, no clue why it's not working
Facing the same error. Any update on this?
Please try adding the following permissions to your androidmanifest.xml file and restart the app: uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"