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

TypeError: null is not an object (evaluating 'RNFSManager.RNFSFileTypeRegular')

Open JClarkeFitness123 opened this issue 5 years ago • 16 comments

JClarkeFitness123 avatar Nov 01 '19 07:11 JClarkeFitness123

+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

MaxBolotnyi avatar Dec 03 '19 15:12 MaxBolotnyi

@FluxProjects786 or @MaxBolotnyi were you using expo?

Daniel-Bleeker avatar Jan 07 '20 00:01 Daniel-Bleeker

@FluxProjects786 or @MaxBolotnyi were you using expo?

I'm using expo and getting this error.. any solution?

MalikNaser avatar Jan 18 '20 15:01 MalikNaser

Duplicate of https://github.com/itinance/react-native-fs/issues/770 maybe tips there might help

CanRau avatar Feb 07 '20 20:02 CanRau

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.

Daniel-Bleeker avatar Feb 08 '20 20:02 Daniel-Bleeker

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

MorayM avatar Feb 10 '20 15:02 MorayM

I think you must reinstall your application after install react-native-fs

ngocdh383 avatar Feb 27 '20 07:02 ngocdh383

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.

akhzarna avatar Mar 24 '20 07:03 akhzarna

It doesn't work for me to do it manually,can you help me? react-native 0.61.5 import 'react-native-fs'

chocolateonly avatar Apr 23 '20 02:04 chocolateonly

I have the same problem, With Expo and Android device

EmmanuelSkapple avatar Apr 30 '20 18:04 EmmanuelSkapple

I fix this issue upgrading the react-native project to 0.63. im not using expo.

starexrex avatar Aug 06 '20 15:08 starexrex

any update on this problem?

allschu avatar Aug 24 '20 14:08 allschu

Devs that use Expo, can also use Expo Filesystem lib that really helped me and it works perfectly

allschu avatar Aug 25 '20 11:08 allschu

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.

iamrohitagg avatar Nov 18 '20 10:11 iamrohitagg

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?

Vexilurz avatar Apr 14 '21 21:04 Vexilurz

image add package in file MainApplication.java

Thanh-Long-Vu avatar Oct 27 '23 04:10 Thanh-Long-Vu