Videl
Videl

Reputation: 31

why @tensorflow/tfjs-react-native not installing in react-native 0.724?

I want to use bodySegmentation model in react-native(0.72.4) project. I installed expo-gl(13.2.0),expo-gl-cpp(11.4.0),tensorflow/tfjs(4.11.0), react(18.2.0) but when i'm trying to install tensorflow/tfjs-react-native(0.8.0) library it's giving following error: Could not resolve dependency: npm ERR! peer expo-gl@"^7.0.0" from @tensorflow/[email protected] npm ERR! node_modules/@tensorflow/tfjs-react-native npm ERR! @tensorflow/tfjs-react-native@"*" from the root project

I want to install tensorflow/tfjs-react-native(0.8.0) with react-native(0.72.4). Please suggest somenthing to resolve this version incompatibility issue. If anyone suggest share required packages along with package.json then it'll be good.

Upvotes: 0

Views: 549

Answers (1)

rekarnar
rekarnar

Reputation: 463

This seems to be the workaround for now: https://github.com/tensorflow/tfjs/issues/7323#issuecomment-1455001477

Copy the entire platform_react_native.ts file (latest 4.2.0 version here) into your project and initialize the RN runtime on your own in App.tsx with import './xxx/platform_react_native';.

Upvotes: 0

Related Questions