The bug has been reported, fixed and merged by sjchmiela into expo-file-system version 5.0.0 10 days ago. (issue #4260, #4239,#4264). while expo SDK still shipping with 4.0.0…
Anyway, the issue is fixed as I switched to react-native-unimodule yesterday. Here are the solutions for those who get trapped:
I didn’t do an eject as I am sure it will be a big mess for a big project. I started with bare-minimum, make sure it work first, then add package and my components one by one. by using react-native-unimodule, I am able to cherry pick the module that I need.
At first, I find that I can directly edit the JAVA code into the .jar source files inside expo-file-system, which is inside node_modules) then build a release version of ur app before it get overwritten ( it sometime will be overwritten by e.g gradlew ./clean)
Then I find in the gradle.groove, if a package is specified with a higher version than the one inside react-native-unimodule (assume it is interfaced in unimodule) in the package.json, it will load the higher version one. So I added expo-file-system:5.0.0 in package.json together with unimodule (it included expo-file-system 4.0.0)
Afterward I find another solution, in package.json, do this :
so in case it got merged but not yet uploaded to npm.
what if it not even merged but u need the fix badly. Fork it ! and then put it like.
After all, all solution works only when you rebuild your project without expo SDK, then you find their new react-native-unimodule is amazing. You wont’ play with spaghetti, again. Wait for SDK 33 to fix expo-file-system, what if other critical bug in expo-camera introduced in it? wait for SDK 34? It simply too big to get everything right in one particular moment. U pull one end of the spaghetti and find another side shortened. react-native-unimodule is ur life savior in short.