question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expo-camera peer dependency conflict with npm 7+ due to @koale/useworker

See original GitHub issue

Summary

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:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
github-actions[bot]commented, Sep 30, 2022

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.

1reaction
Buddimal-Liyanapathiranacommented, Nov 1, 2022

ran to this error and fixed it after running the command npx expo install expo-updates

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Fixed] NPM conflicting peer dependency error
Getting NPM conflicting peer dependency errors? This post will go over ways to fix this!
Read more >
node.js - npm install fails with Conflicting peer dependency
For first error I tried to install npm by below 2 command in Terminal one after another. It fixes for me: npm install...
Read more >
npm-ci
If set to true , and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure, even if...
Read more >
npm 7 is now generally available! - The GitHub Blog
We're announcing version 7 of the npm CLI is now generally available. ... In previous versions of npm (4-6), peer dependencies conflicts ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found