react-native-fs icon indicating copy to clipboard operation
react-native-fs copied to clipboard

TypeError: Cannot read property 'RNFSFileTypeRegular' of null

Open aymeric75 opened this issue 2 years ago • 4 comments

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

aymeric75 avatar Oct 31 '22 16:10 aymeric75

the same error

littledu avatar Nov 21 '22 03:11 littledu

same, no clue why it's not working

ShubhamPatilsd avatar Nov 24 '22 02:11 ShubhamPatilsd

Facing the same error. Any update on this?

NG2525-muthu avatar Apr 04 '23 06:04 NG2525-muthu

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"

lovishoneworld avatar May 22 '23 21:05 lovishoneworld