react-native-tvos / react-native-tvos

React Native repo with additions for Apple TV and Android TV support. https://douglowder.github.io/react-native-apple-tv/
MIT License
825 stars 141 forks source link

Peer dependency error between react-native-tvos and expo #731

Open Jatin-Kamboj opened 2 weeks ago

Jatin-Kamboj commented 2 weeks ago

Description

Which installing react-native-tvos config in existing react native app which is using expo latest version 51.0.8, It does not runs the this command

npx expo install @react-native-tvos/config-tv -- --dev

Instead en error related to Pear dependency is returned

npm ERR! Found: expo@51.0.8 npm ERR! node_modules/expo npm ERR! expo@"~51.0.8" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer expo@"^50.0.6" from @react-native-tvos/config-tv@0.0.9 npm ERR! node_modules/@react-native-tvos/config-tv npm ERR! @react-native-tvos/config-tv@"*" from the root project

Steps to reproduce

  1. Create a new expo app npx create-expo-app@latest
  2. Change package.json with the below lines "react-native": "npm:react-native-tvos@latest",
  3. Execute the following command npx expo install @react-native-tvos/config-tv -- --dev

This will return the below mentioned error npm ERR! Found: expo@51.0.8 npm ERR! node_modules/expo npm ERR! expo@"~51.0.8" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer expo@"^50.0.6" from @react-native-tvos/config-tv@0.0.9 npm ERR! node_modules/@react-native-tvos/config-tv npm ERR! @react-native-tvos/config-tv@"*" from the root project

React Native Version

0.74.1

Affected Platforms

Build - MacOS

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: macOS 13.2.1
  CPU: (8) arm64 Apple M2
  Shell:
    version: 5.8.1
    path: /bin/zsh
Binaries:
  Node:
    version: 20.10.0
    path: ~/.nvm/versions/node/v20.10.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v14.17.0/bin/yarn
  npm:
    version: 10.2.3
    path: ~/.nvm/versions/node/v20.10.0/bin/npm
  Watchman:
    version: 2024.05.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK: Not Found
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.3 AI-233.14808.21.2331.11709847
  Xcode:
    version: /undefined
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 3.2.2
    path: /Users/$Home/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.1
    wanted: npm:react-native-tvos@latest
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

npm ERR! Found: expo@51.0.8
npm ERR! node_modules/expo
npm ERR!   expo@"~51.0.8" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer expo@"^50.0.6" from @react-native-tvos/config-tv@0.0.9
npm ERR! node_modules/@react-native-tvos/config-tv
npm ERR!   @react-native-tvos/config-tv@"*" 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.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:

Reproducer

https://github.com/Jatin-Kamboj/aroogyaease-app

Screenshots and Videos

image
8128 commented 2 weeks ago

I'm having the same issue.

douglowder commented 1 week ago

I'll fix this soon... in the meantime are you able to do yarn add --dev @react-native-tvos/config-tv?

Jatin-Kamboj commented 1 week ago

I'll fix this soon... in the meantime are you able to do yarn add --dev @react-native-tvos/config-tv?

Thanks for picking the issue on priority. I tried the above command, But it throws the same error