react-native-fetch-blob
react-native-fetch-blob copied to clipboard
searchPaths.filter is not a function while UnLinking
Hi ! Thank you for reporting an issue, but we would like to remind you, we have a trouble shooting page in our wiki. You may want to take a look on that page or find issues tagged "trouble shooting" :p
-
please provide the version of installed library and RN project. "react-native": "^0.52.0", "react-native-fetch-blob": "^0.10.8",
-
a sample code snippet/repository is very helpful to spotting the problem.
-
issues which have been tagged as 'needs feedback', will be closed after 2 weeks if receive no feedbacks.
-
issues lack of detailed information will be closed without any feedback
I am trying to unlink the project from iOS due to it now be installed via cocoapods but when I run react-native unlink react-native-fetch-blob I get the following.
rnpm-install info Unlinking react-native-fetch-blob ios dependency
rnpm-install ERR! It seems something went wrong while unlinking. Error: searchPaths.filter is not a function
This thread might help you: https://github.com/facebook/react-native/issues/13160
I change the follow bit of code in the /node_modules/xcode/lib/pbxProject.js
if (searchPaths) { var matches = searchPaths.filter(function(p) { return p.indexOf(new_path) > -1; }); matches.forEach(function(m) { var idx = searchPaths.indexOf(m); searchPaths.splice(idx, 1); }); } to
if (searchPaths) { if(typeof searchPaths === 'string'){ searchPaths = [searchPaths] } var matches = searchPaths.filter(function(p) { return p.indexOf(new_path) > -1; }); matches.forEach(function(m) { var idx = searchPaths.indexOf(m); searchPaths.splice(idx, 1); }); } and it seemed to have fixed the issue as well.