Rn-fetch-blob: Unhandled JS Exception: TypeError: null is not an object (evaluating 'RNFetchBlob.DocumentDir')

Created on 24 Mar 2020  路  8Comments  路  Source: joltup/rn-fetch-blob

Unhandled JS Exception: TypeError: null is not an object (evaluating 'RNFetchBlob.DocumentDir')

Installed library and RN project

"react": "16.9.0",
"react-native": "0.61.5",
"rn-fetch-blob": "^0.12.0"

Simulator Screen Shot - iPad Air - 2020-03-24 at 14 25 34

Most helpful comment

@paulrevival instead of what?

All 8 comments

You have to use RNFetchBlob.fs.dirs.DocumentDir instead)

@paulrevival instead of what?

same issue

You need to manually add

pod 'react-native-fetch-blob',
:path => '../node_modules/react-native-fetch-blob'

to your pod file and don't forget to run pod install afterwards.

yes this helped, I have found this solution on other github issue, thank you

鏄殑锛岃繖鏈夋墍甯姪锛屾垜鍦ㄥ叾浠杇ithub闂涓婃壘鍒颁簡姝よВ鍐虫柟妗堬紝璋㈣阿

Could you tell me how do you solve

@alecpo I meant instead of RNFetchBlob.DocumentDir

In android I just cleared the caches and it just worked. I used all these commands:

  1. npm cache clean --force
  2. watchman watch-del-all
  3. cd android -> gradlew clean
Was this page helpful?
0 / 5 - 0 ratings

Related issues

nobady90 picture nobady90  路  22Comments

meiqi1992 picture meiqi1992  路  19Comments

fanzhiri picture fanzhiri  路  46Comments

uendar picture uendar  路  24Comments

fa16mscs0004 picture fa16mscs0004  路  13Comments