expo-camera peer dependency conflict with npm 7+ due to @koale/useworker
See original GitHub issueSummary
The expected behavior is that when I install expo-camera in a React Native app created by running npx react-native init
, which uses react 17.0.2, there will be a version of react that satisfies all peerDependencies.
However, I get this error: Unable to find a version of react that satisfies the following peerDependencies: 17.0.2 and ^16.0.0 || ^17.0.0 || ^18.0.0 and ^16.8.0 and ^16.0.0 || ^17.0.0 and ^16.8.0 || ^17.0.0
.
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
No response
Environment
expo-env-info 1.0.3 environment info: System: OS: macOS 12.1 Shell: 5.8 - /bin/zsh Binaries: Node: 16.11.1 - ~/.nvm/versions/node/v16.11.1/bin/node Yarn: 1.22.18 - ~/.nvm/versions/node/v16.11.1/bin/yarn npm: 8.0.0 - ~/.nvm/versions/node/v16.11.1/bin/npm Watchman: 2022.05.23.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 25, 27, 29, 30, 31 Build Tools: 27.0.3, 29.0.2, 30.0.1, 30.0.2, 31.0.0 System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8309675 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild npmPackages: expo: ^45.0.0 => 45.0.5 react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 npmGlobalPackages: expo-cli: 5.0.3 Expo Workflow: bare
Reproducible demo
Run the following commands:
npx react-native init expovideo
cd expovideo
npx install-expo-modules@latest
expo install expo-camera
Then run npx check-peer-dependencies --findSolutions
. The output includes this:
❌ Unable to find a version of react that satisfies the following peerDependencies: 17.0.2 and ^16.0.0 || ^17.0.0 || ^18.0.0 and ^16.8.0 and ^16.0.0 || ^17.0.0 and ^16.8.0 || ^17.0.0
The error is due to the package @koale/useworker: ❌ react ^16.8.0 is required by @koale/useworker@4.0.2) (17.0.2 is installed)
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.
ran to this error and fixed it after running the command npx expo install expo-updates