MrPie
MrPie

Reputation: 173

Fix the upstream dependency conflict tfjs-react-native

I'm trying to install tfjs-react-native for a project that it's also using expo-camera but I get an error. I followed the instructions on https://www.npmjs.com/package/@tensorflow/tfjs-react-native and installed every dependency, but I fail at the last step which is:

npm install @tensorflow/tfjs-react-native

I'm not able to understand what it's asking me. It seems that tfjs-react-native tries to use expo-camera@7 and I have installed the last one which is 12.3.0. Is that the problem? If so how can I fix this?

Hopefully somebody can help me out. Thanks

While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/expo-camera npm ERR! expo-camera@"~12.3.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer expo-camera@"^7.0.0" from @tensorflow/[email protected] npm ERR! node_modules/@tensorflow/tfjs-react-native npm ERR!
@tensorflow/tfjs-react-native@"^0.8.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Upvotes: 0

Views: 711

Answers (1)

MrPie
MrPie

Reputation: 173

I solved it using --legacy-peer-deps. Now I was able to install it, my project still don't work but I will post the problem in another question.

Upvotes: 2

Related Questions