forked from wkh237/react-native-fetch-blob
-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require cycle #768
Comments
@SusulAdam create file // rn-fetch-blob.js
const fs = require('fs');
const replaced = "import RNFetchBlob from '../index.js'";
const replacement =
"import {NativeModules} from 'react-native';\nconst RNFetchBlob = NativeModules.RNFetchBlob";
const files = [
'node_modules/rn-fetch-blob/polyfill/Fetch.js',
'node_modules/rn-fetch-blob/polyfill/Blob.js',
'node_modules/rn-fetch-blob/polyfill/XMLHttpRequest.js',
];
files.forEach(file => {
fs.readFile(file, 'utf8', function (readErr, data) {
if (readErr) {
return null;
}
const result = data.replace(new RegExp(replaced, 'g'), replacement);
fs.writeFile(file, result, 'utf8', function (err) {
if (err) {
return null;
}
});
});
}); Run |
Is there a permanent solution to this? I don't have my node_modules included on the project repository. |
Probably it is easier to use patch-package, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"rn-fetch-blob": "0.12.0"
"react-native": "0.63.3"
I am struggle with three warning Require cycle:
The text was updated successfully, but these errors were encountered: