React Native: Cannot read property 'RNFSFileTypeRegular' of undefined

Viewed 4204

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 ?

3 Answers

You can try:

react-native link react-native-fs
  • 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

Try Xcode for RUN the Project it Fixed my Issue on IOS.

Related