React-native-fs used while migrating project throwing an error
I am migrating my existing react-native project which runs on Android to Tizen. Within the project, I am using react-native-fs to read/write files to the device. However, when I use it within the Renative project, since it runs on the web browser for hot reload during development , I get an error : FS.common.js: Unexpected token, expected "," I have tried changing the engine to engine-rn to try to run the app on the emulator, but the engine does not support Tizen.
Please could you suggest where I am going wrong. Thanks!
@anurastogi Thanks for reporting this issue, could you provide rnv and node versions, os type?
Hello Gabriel,
OS type I was trying this for is Tizen. RNV version - 0.37.1 Node version - 14.18.0
Please let me know if you need any more information.
Hello @anurastogi,
Sorry for the late reply.
Library react-native-fs only support Android, iOS, Mac (Catalyst), and Windows platforms.
Renative can't change third party library so that it could support others platforms like for example Tizen.
However, in Renative there is an option to make a component for specific platform:
This way you can encapsulate the component so it's only runs for that specific platform. That's how you can use libraries for specific platform.
Closing as answer has been provided, feel free to reopen if needed