3

I created a fresh app with create-react-native-app, and immediately updated the Expo SDK to 29.0.0 using these instructions.

One of the instructions is to set "react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz" in package.json. This version of Expo specifically uses React Native 0.55.4 as per this table.

Yet when I yarn install I get dependency warnings like these:

warning "expo > react-native-maps@0.21.0" has incorrect peer dependency "react-native@^0.51 || ^0.52 || ^0.53 || ^0.54".

warning "expo > react-native-reanimated@1.0.0-alpha.3" has incorrect peer dependency "react-native@^0.44.1".

I guess I'm confused as to how I could possible fix these if Expo needs one version of React Native, and a dependency of Expo needs a conflicting version.

How do you address these sorts of conflicts in general? Most of the advice I've gotten is "if your app works, ignore them". Is that actually the accepted approach?

Community
  • 1
  • 1
mikegee
  • 63
  • 5

1 Answers1

0

The error there means that version 0.21.0 of react-native-maps is not updated to work with react-native 0.55 yet.

If there's a newer version of react-native-maps you can use then you should update to it, otherwise you can ignore it, and things may or may not work depending on what changed between 0.54 and 0.55. In javascript-land you're unlikely to see the errors until runtime, so this may involve some testing.

Another option is to not upgrade react-native to 0.55 until all your dependencies catch up.

Dave Kasper
  • 1,369
  • 1
  • 11
  • 18
  • That all make sense, but why would Expo require a version of react-native that one of Expo's dependencies doesn't support? – mikegee Aug 04 '18 at 15:40
  • I think he missed the point about it being a fresh app? I don't really get it either. It's all very flaky feeling. Why mark things as stable when they clearly aren't? point being if you just run through the official(more or less) starter guide and your output is full of incorrect dep and unmet dependency messages right now at least on windows. – Lassi Kinnunen Aug 30 '18 at 08:52