Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expo/next-adapter outdated peer dependencies #8

Closed
dannyhw opened this issue Dec 13, 2022 · 5 comments · Fixed by #25
Closed

expo/next-adapter outdated peer dependencies #8

dannyhw opened this issue Dec 13, 2022 · 5 comments · Fixed by #25

Comments

@dannyhw
Copy link

dannyhw commented Dec 13, 2022

Summary

EDIT: when I check the code here it looks like this was already addressed but not published?

It seems like the next adapter has peer dependencies on next 11 and react 17.

Is the adapter ok to use with the latest versions? if so then I think the version range should be updated more like ^11 || ^12 || ^13 or >11


└─┬ @expo/next-adapter 4.0.13
  ├── ✕ unmet peer next@^11: found 13.0.6
  ├── ✕ unmet peer react@^17: found 18.2.0
  └── ✕ unmet peer react-native-web@^0.17.0: found 0.18.10

when the project is installed from npm it has these peer dependencies defined

  "peerDependencies": {
    "next": "^11",
    "react": "^17",
    "react-native-web": "^0.17.0"
  },

For example with next this doesn't actually allow for versions above 11 instead its resolving to 11.1.4.

see here for an example https://semver.npmjs.com/

Happy to contribute this if you want.

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.0.1
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.1 - /usr/local/opt/asdf/installs/nodejs/16.13.1/bin/node
Yarn: 1.23.0-20211220.1904 - /usr/local/opt/asdf/installs/nodejs/16.13.1/.npm/bin/yarn
npm: 8.19.2 - /usr/local/opt/asdf/plugins/nodejs/shims/npm
Watchman: 2022.02.14.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8193401
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
npmGlobalPackages:
eas-cli: 3.0.0
expo-cli: 6.0.8
Expo Workflow: managed

"packageManager": "pnpm@7.18.1"

Please specify your device/emulator/simulator platform, model and version

not relevant since its a npm dependency thing

Error output

 WARN  Issues with peer dependencies found

 └─┬ @expo/next-adapter 4.0.13 ├── ✕ unmet peer next@^11: found 13.0.6 ├── ✕ unmet peer react@^17: found 18.2.0 └── ✕ unmet peer react-native-web@^0.17.0: found 0.18.10  

Reproducible demo or steps to reproduce from a blank project

On this branch of this is a sample project you can reproduce the issue.

dannyhw/react-native-nextjs-turbo-repo#3

this is truly an example project so it should almost be about as minimal as possible.

@luixo
Copy link

luixo commented Jan 12, 2023

Also, peer dependency for expo itself is ^46 which means version 47.0.0 and later don't fit. It should be probably updated based on current expo version in the root package.json.

@MorningLit
Copy link

so can anyone confirm that @expo/next-adapter works with the latest version of expo? (version 48^) ☹️

@akirchmyer
Copy link

@MorningLit I can confirm it has been working for me on Expo 47 & 48

@akirchmyer
Copy link

akirchmyer commented Jul 16, 2023

My team has been able to suppress this error during npm install with the following override in our package.json, which defers to the installed version of expo. We have not had any issues.

  "overrides": {
    "@expo/next-adapter": {
      "expo": "$expo"
    }
  }

@byCedric byCedric transferred this issue from expo/expo-cli Dec 30, 2023
@byCedric
Copy link
Member

byCedric commented Jan 8, 2024

See: expo/examples#449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants