React-native-fs: cannot read property of RNFSFileTypeRegular of undefined after react-native upgrade

Created on 7 Jan 2017  路  6Comments  路  Source: itinance/react-native-fs

like the title says after running react-native upgrade my simulator throws a red error screen.

feedback-wanted

Most helpful comment

This flares up from time to time. It means the native part of the module isn't loading. It's usually because the reference to libRNFS.a has been lost from the project. Make sure you have it in "Build Phases" -> "Link Binary With Libraries".

All 6 comments

This flares up from time to time. It means the native part of the module isn't loading. It's usually because the reference to libRNFS.a has been lost from the project. Make sure you have it in "Build Phases" -> "Link Binary With Libraries".

Thank you @cjdell. In my case I added this component to my project and tried to run it immediately on android - debug mode. However it loaded my old bundle and give me this error because, as you said, my bundle did not have the required native parts. I re-bundled and install my project to the device then error disappeared.

@cjdell hi i have followed your instruction and did that same exact steps and I still getting this error. #258 references.

For me, I'm using react-native version 0.35.0 and I was having the same issue for a time as well.

But what I ended up doing was making use to use the appropriate version of react-native-fs (which at the time of this writing was npm i [email protected] --save). Then react-native link react-native-fs which does the editing of the MainActivity.java and MainApplication.java files to ensure that it is included properly and then recompiling the entire app over again.

It doesn't seem like hot-reloading after importing this module will work.

Hope that helps.

Any feedback?

Closed because of lag of feedback

Was this page helpful?
0 / 5 - 0 ratings