Require cycle: node_modules/rn-fetch-blob/index.js uninitialized values

54 views Asked by At

Require cycle: node_modules/rn-fetch-blob/index.js -> node_modules/rn-fetch-blob/polyfill/index.js -> node_modules/rn-fetch-blob/polyfill/XMLHttpRequest.js -> node_modules/rn-fetch-blob/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.

1

There are 1 answers

1
Sumit On

Inside rn-fetch-blob Library,

all these 4 files: Blob.js, Fetch.js, FileReader.js, XMLHttpRequest.js

Comment this line:

import RNFetchBlob from '../index.js'

Then, add below line:

import { NativeModules } from 'react-native'; 

const RNFetchBlob = NativeModules.RNFetchBlob