-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Cannot read property 'DocumentDir' of undefined #251
Comments
I'm having the same issue with Android, but running well with IOS: Error is coming from this lines in fs.js:
|
I have tried install the package in a pure 0.40 environment, it worked without any problem. Please check if the projects are linked, or remove the package and install again 👍 |
I had to remove the "build" folder inside my "ios" folder and then restart my simulator. After that it's working fine |
I'm getting a similar issue - I can't import anything from import RNFetchBlob from 'react-native-fetch-blob' results in the following error: I've tried resetting the cache, removing the build directory, reinstalling, relinking, and resetting content and settings on the simulator Xcode version 8.2.1 EDIT: Updated screenshot |
Have you guys tried to rebuild them? I had same error and after i rebuilded with 'react-native run-ios' it fixed. |
I have save issue with @bendyorke but in android |
Hey, I had the same issue on Android and I managed to solve it. I have tried installing and uninstalling, linking and unlinking. it didn't work. After some investigation I found out that the automatic linking did not update my MainApplication.java file. Make sure that it is configured properly by adding these lines:
You can find the full explanation here: Hope this helps |
+1 I have the same issue too in iOS build |
Here i found the solutions and it worked for me. step1. step2. step3.
like so, and run the script. |
To piggyback on @bogobogo's post, I came across this issue starting Friday (July 28) and by yesterday found this thread that helped me clear up issue. When I would run 'RNFB_ANDROID_PERMISSIONS=true react-native link' to link the android libs it wouldn't actually do any of the linking but it did manage to make entries in my AndroidManifest.xml file. The problem though is it created two duplicated entries. I removed the duplicates and finished linking for android manually and was able to build and run on an emulator. I assume linking manually for iOS would yield a similar result, if needed. |
I solve this issue just linking project
|
Fixed by reinstalling everything and manually linking again, https://github.com/wkh237/react-native-fetch-blob/wiki/Manually-Link-Package |
on Ios, if you use Cocoapods make sure to run pod install after linking. |
Hello i have solved this issue for iOS---- when you install the you can to open project from iOS in Xcode then remove the library of RNFetchBlob.xcodeproj from library folder and then again add by right click on library folder from node modules-->react-native-fetch-blob--->iOS folder --->add project RNFetchBlob.xcodeproj then all required file will be there and make sure add lib on build phases also libRNFetchBlob.a it works for me. Thanks |
Try to recompile your project with Android Studio .. it works for me! |
I have this same issue with a simple empty project with expo via Simply adding Dependencies:
|
If its helpful to anyone, my workaround from this issue in Expo is just using ImageStore and ImageEditor from
|
After having the same issues, I managed to install
I think the important part that I was missing even previously is to run Here's my
Hope this helps! |
On my Xcode I get "Cannot read property 'DocumentDir' of undefined".
I am using version 8.2.1 of Xcode.
With reference to issue #31 I read that this problem is related to the Xcode and that the problem has been solved for Xcode < 7.3.
I would like to know if my problem can't be solved since I'm using Xcode 8.2.1.
Thanks in advance
The text was updated successfully, but these errors were encountered: