Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native: Cannot read property 'RNFSFileTypeRegular' of undefined

I'm using https://github.com/itinance/react-native-fs in my app. But on running I'm getting the following error message.

Cannot read property 'RNFSFileTypeRegular' of undefined.

But the same repo cloned and ran in another laptop works fine.

Using Mac OS Sierra.

I suspect this has something to do with `node_modules'.

Tried uninstalling node and npm, still the same error. What am I doing wrong here ?

like image 568
Sooraj Avatar asked May 27 '17 17:05

Sooraj


2 Answers

You can try:

react-native link react-native-fs
like image 89
bennyh Avatar answered Nov 11 '22 20:11

bennyh


  • Use manual linking instead of automatic linking
  • Then remove cache using the following command

    react-native start --reset-cache

  • Then re-run react-native run-android or react-native run-ios

This should fix your problem

like image 20
Hussam Kurd Avatar answered Nov 11 '22 20:11

Hussam Kurd