Undefined is not an object(evaluating 'RNFetchBlob.DocumentDir')
Opened this issue · 12 comments
same issue here.
"react": "16.3.0-alpha.1",
"react-native": "0.54.3",
UPDATE:
solved by correctly adding the package on native side, because react-native link have not done it correctly.
@quarkcore
I follow this document but still error.
@safeimuslim
i use the application implementation of react-native-navigation where it has another method to register native modules.
espacially i have no idea about ios on native because im comming from the android world..
i only found out that the error is normaly caused if not registered on native properly.
npm install && react-native link
worked for me!
npm install && react-native link not worked for me. Any other solution
Hello i have solved this issue for iOS---- when you install the react-native-fetch-blob and link with iOS, it only provide limited lib on native side.
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
not work for me in windows
npm link or manual configuration both not working for me
me too cannot make this work
{
"name": "my-new-project",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/samples": "2.1.1",
"expo": "^30.0.1",
"moment": "^2.23.0",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-native-elements": "^0.19.1",
"react-native-email": "^1.0.2",
"react-native-fetch-blob": "^0.10.8",
"react-native-image-picker": "^0.28.0",
"react-native-modal-datetime-picker": "^6.0.0",
"react-native-responsive-screen": "^1.2.0",
"react-native-router-flux": "^4.0.6",
"react-native-select-input-ios": "^2.0.1",
"react-navigation": "^2.18.3",
"rn-fetch-blob": "^0.10.15"
},
"devDependencies": {
"jest-expo": "32.0.0"
}
}
The error I get:

same issue here.
"react": "16.3.0-alpha.1",
"react-native": "0.54.3",UPDATE:
solved by correctly adding the package on native side, because react-native link have not done it correctly.
HOw did you do it exactly? Do you recall? What do you mean adding package on native side??
Solved it for my self by doing
npm install react-native-fetch-blob
react-native link
then manually adding libRNFetchBlob.a to "Link Binary with Libraries"
