react-native-fs
react-native-fs copied to clipboard
TypeError: null is not an object (evaluating 'RNFSManager.RNFSFileTypeRegular')
+1
Anything here? After updating to react-native 0.60.6 ( rnfs version 2.13.2 ) the error occurs. Have no success to fix it yet, need help
@FluxProjects786 or @MaxBolotnyi were you using expo?
@FluxProjects786 or @MaxBolotnyi were you using expo?
I'm using expo and getting this error.. any solution?
Duplicate of https://github.com/itinance/react-native-fs/issues/770 maybe tips there might help
Sorry, Looking back at post instances of this error occurring #493 , #770 , #259 . It seems Expo has a problem with linked modules in react-native causing it to give this error. #688 maybe of help.
I'm also getting this error, on a vanilla project. All I've done so far is
npx react-native init NavTest --version 0.59.10
react-native run-ios
and up it pops in the simulator. I'm not using Expo for anything.
I fixed it from this issue with
react-native unlink react-native-fs
npm uninstall react-native-fs
npm i react-native-fs --save
react-native link react-native-fs
I think you must reinstall your application after install react-native-fs
In case of iOS message is 'Native module cannot be null', In Android message is 'null is not an object evaluating RNFSManager etc'
Solution for iOS is run pod install
in iOS Directory, then react-native run-ios
to re-run the app.
Solution for android is react-native link react-native-fs
then react-native run-android
to re-run the app.
It doesn't work for me to do it manually,can you help me? react-native 0.61.5 import 'react-native-fs'
I have the same problem, With Expo and Android device
I fix this issue upgrading the react-native project to 0.63. im not using expo.
any update on this problem?
Devs that use Expo, can also use Expo Filesystem lib that really helped me and it works perfectly
I was facing the same error on Android
device.
react-native : 0.61.4
react-native-fs : 2.16.6
How can I fix this?
I have done
npm install react-native-fs
npx react-native run-android
The problem was that I have not build the application again after uninstalling.
I still got this error.
I created project like that:
expo init myProject --template blank
Lib versions:
$ react-native -v
react-native-cli: 2.0.1
react-native: 0.63.2
Packages versions:
"react-native-fs": "^2.17.0"
I have done:
npm install react-native-fs --save
// and also try "expo install react-native-fs"
react-native link react-native-fs
// and also try just "react-native link"
Importing like that:
import * as RNFS from 'react-native-fs';
And I still got this error when I just try to do this:
console.log(RNFS.DownloadDirectoryPath);
What I need to try else to fix that?
add package in file MainApplication.java