react-native-blob-util: TypeError: null is not an object
env
os: macOS 10.15.7
mobile device : Motorolla power one, running stock android10
react-native-blob-util version: 0.13.7
react-native: 0.61.5
AndroidManifest.xml
...
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
....
<application
...
android:requestLegacyExternalStorage="true"
>
...
code
import ReactNativeBlobUtil from 'react-native-blob-util'
const tempImageUri = await ReactNativeBlobUtil.config({ fileCache: true }).fetch(`${image_url}`)
error
TypeError : null is not an object (evaluating 'ReactNativeBlobUtil.DocumentDir')
Any idea where I might be going wrong?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 8
- Comments: 23 (6 by maintainers)
@CoreyBovalina If you’re using
yarnthen can you try this?package.jsonnode_modulesand runyarn installagainin addition to doing having it as an added package as well?
when I tried doing this and it didn’t fix it before:
yarn add react-native-pdf react-native-blob-util fbjsI fixed sth that could cause it, so probably you got that fix now. I’m glad it’s now working for you
in my case this is not an expo project, it is a plain simple react-native project