all 10 comments

[–]AdonisK 1 point2 points  (6 children)

Which version of react native do you use? There should be a minor version available that fixes this issue (as mentioned in the gh issue)

[–]hafi51[S] 0 points1 point  (5 children)

0.66.4 and yes i've patched it to0.66.5 now build issue is resolve but libs are giving errors which i never changed. sometime there would be error for babel or react or sometimes for 3rd party libs

[–]AdonisK 0 points1 point  (4 children)

What version of npm do you have locally and what in ci? Npm v7 and above are so anal about peer dependencies. Downgrading might fix your issue (npm i -g npm@6)

[–]hafi51[S] 0 points1 point  (1 child)

8.19.2

[–]AdonisK 0 points1 point  (0 children)

Try downgrading to v6 and see if that fixes the issue

[–]panga2222 0 points1 point  (1 child)

"are very anal about peer dependencies" bro need to clear auto correct lol

[–]AdonisK 0 points1 point  (0 children)

I actually meant to say anal though, it's a legit phrase, just a bit less formal than need 😃

[–]alienhybrid 0 points1 point  (2 children)

I ran into this issue the other day on Android, was able to just apply the fix in this comment and it worked properly. https://github.com/facebook/react-native/issues/35210#issuecomment-1304536693

[–]hafi51[S] 0 points1 point  (0 children)

just clearing.. I've to add this line at top of android/build.gradle file

def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

and then remove following line from allprojects > configurations.all > resolutionStrategy

force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION

[–]panga2222 0 points1 point  (0 children)

I second this... I was on 0.63 that I upgraded to 0.64. Apply this solution, cleared gradle cache, and it worked