joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.8k stars 770 forks source link

RNFetchBlob.DocumentDir #244

Open Ahsanch11 opened 5 years ago

Ahsanch11 commented 5 years ago

package.json

{ "name": "fante", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "native-base": "^2.8.1", "react": "16.6.0-alpha.8af6728", "react-native": "0.57.4", "react-native-extra-dimensions-android": "^0.22.0", "react-native-router-flux": "^4.0.6", "react-native-wallpaper-manager": "^0.3.16", "rn-fetch-blob": "^0.10.13" }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.49.0", "react-test-renderer": "16.6.0-alpha.8af6728" }, "jest": { "preset": "react-native" } } capture

i just install the rn-fetch-blob and import it in to the component and it gives me the error like undefined is not an object RNFetchBlob.DocumentDir.

could you please help me to figure out this bug.

MikeWoots commented 5 years ago

I fixed this by following the instructions on manually linking project rather running react-native link

Ahsanch11 commented 5 years ago

i tried it too but the issue is still exists.

devpascoe commented 5 years ago

had this issue because i forgot to rebuild the ios app. Instead was just refreshing simulator but link had added packages so i needed to rebuild and relaunch.

hsnMoghadasi commented 5 years ago

I have same issues on ios.

hsnMoghadasi commented 5 years ago

the automatical linking doesn't work for me. I fixed it by following the instructions on manually linking.

https://github.com/hsnMoghadasi/rn-fetch-blob#user-content-installation

tskorupka commented 5 years ago

Maybe it has to be RNFetchBlob.fs.dirs.DocumentDir;

EgidioCaprino commented 4 years ago

We're having a similar issue after upgrading to React Native 0.60 and using auto linking.

Screenshot_20190801-112619_Yeppik

fanzhiri commented 4 years ago

We're having a similar issue after upgrading to React Native 0.60 and using auto linking.

Screenshot_20190801-112619_Yeppik

I have the same troubles

pcowgill commented 4 years ago

This fixed it for me when I ran into this issue on iOS: (From the project root) rm -rf ios/Pods && rm -rf ios/build && cd ios && pod install

Temirtator commented 4 years ago

For me solution was gradlew clean and gradlew cleanBuildCache command on AS, then reinstalling of application.

iamraajkanchan commented 3 years ago

All the solution is for ios, what about the people using react native on Windows. Any suggestions.

rajeevrocker7 commented 2 years ago

in Android->MainApplication.java add these 2 if you are using both after linking.. check if not present, add both:

new RNFSPackage(), new RNFetchBlobPackage()