xcarpentier / react-native-country-picker-modal

🇦🇶 Country picker provides a modal allowing a user to select a country from a list. It display a flag next to each country name.
https://reactnative.gallery/xcarpentier/country-picker
MIT License
1.07k stars 795 forks source link

Could not resolve dependency - @callstack/react-theme-provider@3.0.3 #496

Open Jammy1782 opened 1 year ago

Jammy1782 commented 1 year ago

Issue Description

[stderr] npm WARN Could not resolve dependency: [stderr] npm WARN peer react@"^16.3.0" from @callstack/react-theme-provider@3.0.3 [stderr] npm WARN node_modules/@callstack/react-theme-provider [stderr] npm WARN @callstack/react-theme-provider@"3.0.3" from react-native-country-picker-modal@2.0.0 [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

alexander01202 commented 1 year ago

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

aklevko commented 1 year ago

The same problem

ztamizzen commented 1 year ago

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 modal-react-native-web@0.2.0
npm WARN node_modules/modal-react-native-web
npm WARN   modal-react-native-web@"0.2.0" from react-native-country-picker-modal@2.0.0
npm WARN   node_modules/react-native-country-picker-modal
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"16.x.x" from modal-react-native-web@0.2.0
npm WARN   node_modules/modal-react-native-web
npm WARN     modal-react-native-web@"0.2.0" from react-native-country-picker-modal@2.0.0
npm WARN     node_modules/react-native-country-picker-modal
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
Jammy1782 commented 1 year ago

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",

ztamizzen commented 1 year ago

Will try, thank you.

eakenbor commented 1 year ago

@ztamizzen did it work?

ztamizzen commented 1 year ago

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.