Update tfjs-react-native dependencies #8062
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #7454 and fix #7323
This is a follow-up on discussion in #7415 to fix and update the dependencies for tfjs-react-native library, and allow it to work out of the box without tinkering or patching.
The package with new dependencies has been tested (published using a different package name tfjs-react-native-para-patch) using a sample app I created at https://github.com/paradite/tfjs-sample-expo-app
I also updated the docs on how to handle the potential peer conflicts in future when the other dependencies eventually get updated (using
yarn
would not result in error even if the peer dependency conflicts with the direct dependency).I will be continuing to work on this app to reach feature parity of the old sample app in the tf.js repo and submit another PR to replace it. The new app will be based on Expo and eliminate the need to having iOS and Android native code.
Just a side note,
@tensorflow/tfjs-react-native
has not been updated in the past two years and obviously does not get published together with other packages, so someone might need to take a look at the process to publish a new version: https://www.npmjs.com/package/@tensorflow/tfjs-react-native?activeTab=versions. In my testing, running npm run build is sufficient to get it working.