react-native-country-picker-modal icon indicating copy to clipboard operation
react-native-country-picker-modal copied to clipboard

Could not resolve dependency - @callstack/[email protected]

Open Jammy1782 opened this issue 2 years ago • 7 comments

Issue Description

[stderr] npm WARN Could not resolve dependency: [stderr] npm WARN peer react@"^16.3.0" from @callstack/[email protected] [stderr] npm WARN node_modules/@callstack/react-theme-provider [stderr] npm WARN @callstack/react-theme-provider@"3.0.3" from [email protected] [stderr] npm WARN node_modules/react-native-country-picker-modal

Steps to Reproduce / Code Snippets

Building with Expo 45

Expected Results

Build should be successful

Additional Information

  • Nodejs version:
  • React version: 17.0.2
  • React Native version: 0.68.2
  • react-native-country-picker-modal version: ^2.0.0
  • Platform(s) (iOS, Android, web, or all?): iOS
  • TypeScript version:

Jammy1782 avatar Dec 04 '22 04:12 Jammy1782

Hello. I'm having the same error. Did you resolve this?

alexander01202 avatar Feb 06 '23 03:02 alexander01202

The same problem

aklevko avatar Feb 17 '23 14:02 aklevko

I have kind of the same problem because I'm upgrading to Expo@46 and the React versions collide in a spectacular way.

I assume it's because the React version is fixed to 16 in modal-react-native-web.

A good rewrite could be to use the Modal that now exists in react-native-web.

npm WARN Could not resolve dependency:
npm WARN peer react@"16.x.x" from [email protected]
npm WARN node_modules/modal-react-native-web
npm WARN   modal-react-native-web@"0.2.0" from [email protected]
npm WARN   node_modules/react-native-country-picker-modal
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"16.x.x" from [email protected]
npm WARN   node_modules/modal-react-native-web
npm WARN     modal-react-native-web@"0.2.0" from [email protected]
npm WARN     node_modules/react-native-country-picker-modal
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency

ztamizzen avatar Apr 13 '23 13:04 ztamizzen

I don't exactly remember how I resolved this issue, but can you guys try out the specific versions of these 3 packages if you are using it. vividly remember these were the causes of it. "react-native-web": "~0.18.7", "react-native-reanimated": "~2.12.0", "react-native-screens": "~3.18.0",

Jammy1782 avatar Apr 17 '23 11:04 Jammy1782

Will try, thank you.

ztamizzen avatar Apr 17 '23 13:04 ztamizzen

@ztamizzen did it work?

eakenbor avatar Apr 18 '23 13:04 eakenbor

Not really, I still get ERESOLVE overriding peer dependency on versions of React. The dependency chain is way to intricate for me to fix things myself (time/budget/life...).

And I realize that yarn will probably fix this for me but I like a clean project that builds regardless of package manager.

ztamizzen avatar Apr 19 '23 14:04 ztamizzen