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

[!] NPM package '@react-native-firebase/analytics' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes. #3642

Closed
ethanneff opened this issue May 13, 2020 · 10 comments
Labels
impact: build-error Behaviour causing build failure Priority: P1 type: bug New bug report
Milestone

Comments

@ethanneff
Copy link

Version

@react-native-firebase 7.0.0

Example

$ pod install
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Adding a custom script phase for Pod RNFBCrashlytics: [RNFB] Crashlytics Configuration
Detected React Native module pods for RNCAsyncStorage, RNDeviceInfo, RNFBAnalytics, RNFBApp, RNFBAuth, RNFBCrashlytics, RNFBFirestore, RNFBRemoteConfig, RNVectorIcons, appcenter-analytics, appcenter-core, appcenter-crashes, react-native-get-random-values, react-native-netinfo, and react-native-slider
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 51 dependencies from the Podfile and 83 total pods installed.

[!] NPM package '@react-native-firebase/analytics' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.

[!] NPM package '@react-native-firebase/auth' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.

[!] NPM package '@react-native-firebase/crashlytics' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.

[!] NPM package '@react-native-firebase/firestore' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.

[!] NPM package '@react-native-firebase/remote-config' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.

[!] NPM package '@react-native-firebase/analytics' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.

[!] NPM package '@react-native-firebase/auth' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.

[!] NPM package '@react-native-firebase/crashlytics' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.

[!] NPM package '@react-native-firebase/firestore' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.

[!] NPM package '@react-native-firebase/remote-config' depends on '@react-native-firebase/app' v6.7.1 but found v7.0.0, this might cause build issues or runtime crashes.
@mikehardy
Copy link
Collaborator

What are the full steps that you did to receive this?

v7.0.0 was just published and I'm guessing there is a partial update in your project instead of a full one? Are you certain you have updated all of your packages to v7.0.0?

@ethanneff
Copy link
Author

Screen Shot 2020-05-12 at 9 22 04 PM

I updated the firebase dependencies, ran yarn install, then pod install. These warnings came from the pod install

@mikehardy
Copy link
Collaborator

Interesting - I also notice on yarn install that the peer dependencies give similar warnings that they are expecting 6.7.1 but getting 7.0.0 - and I see your error as well when I run https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh on macOS (I had tested it on linux with @Salakar right after he pushed v7.0.0 out and it seemed fine - I should have checked macOS as well obviously)

While these are warnings that definitely need fixing, they are exactly the sort of thing you'd expect as react-native-firebase goes from lockstep versioning in v6 to independent versioning in v7

I'm not saying I guarantee everything will work but these were just published and they passed all the CI tests plus my demo script does actually run as well, should be okay to develop against for now while this is sorted

@mikehardy mikehardy added impact: build-error Behaviour causing build failure help: needs-triage Issue needs additional investigation/triaging. labels May 13, 2020
@mikehardy mikehardy added this to the v7.0.0 milestone May 13, 2020
@Gyran
Copy link
Contributor

Gyran commented May 13, 2020

In packages.json 6.7.1 is defined as a peer dependency, but in the pod file for every package it checks that the peer dependency version is the same as the version we install

https://github.com/invertase/react-native-firebase/blob/master/packages/analytics/package.json#L25
https://github.com/invertase/react-native-firebase/blob/master/packages/analytics/RNFBAnalytics.podspec#L6

So this can probably be fixed by setting the peer dependency to 7.0.0, but I guess that will require that all packages know the next app version when releasing, or that app is always released first and then all sub packages.
It will also be problematic if different packages have different app peer dependency versions as well.

@Salakar
Copy link
Member

Salakar commented May 13, 2020

Urgh lerna should have bumped these as part of the release, turns out lerna doesn't bump peerDependencies: lerna/lerna#1575 😭

Gonna have to push a manual fix for this, will do shortly.

On the plus side, the warnings are all working correctly 😀

@Salakar
Copy link
Member

Salakar commented May 13, 2020

Hey all,

Could you try upgrading all your packages to ^7.0.1 - I've just published a fix for this which seems to have now resulted in peer dependencies being correctly updated: dcef96c

@Salakar Salakar added type: bug New bug report Priority: P1 and removed help: needs-triage Issue needs additional investigation/triaging. labels May 13, 2020
@ethanneff
Copy link
Author

7.0.1 works. Thank you

$ pod install
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Adding a custom script phase for Pod RNFBCrashlytics: [RNFB] Crashlytics Configuration
Detected React Native module pods for RNCAsyncStorage, RNDeviceInfo, RNFBAnalytics, RNFBApp, RNFBAuth, RNFBCrashlytics, RNFBFirestore, RNFBRemoteConfig, RNVectorIcons, appcenter-analytics, appcenter-core, appcenter-crashes, react-native-get-random-values, react-native-netinfo, and react-native-slider
Analyzing dependencies
Downloading dependencies
Installing RNFBAnalytics 7.0.1 (was 7.0.0)
Installing RNFBApp 7.0.1 (was 7.0.0)
Installing RNFBAuth 7.0.1 (was 7.0.0)
Installing RNFBCrashlytics 7.0.1 (was 7.0.0)
Installing RNFBFirestore 7.0.1 (was 7.0.0)
Installing RNFBRemoteConfig 7.0.1 (was 7.0.0)
Generating Pods project
Integrating client project
Pod installation complete! There are 51 dependencies from the Podfile and 83 total pods installed.

@dommangetnicolas
Copy link

In my case, I've resolved the problem by doing this:

  • sudo rm -rf node_modules
  • Deleting the firebase references in package.json
  • Deleting Pods folder and Podfile.lock
  • Adding Firebase dependencies 1 by 1 and pod install each time

@HeshamEG
Copy link

Remove yarn.lock .
Remove Podfile.lock from ios folder .
Inside package.json "@react-native-firebase/app": "^x.x.x" and any react-native-firebase package remove ^ it will be like this "@react-native-firebase/app": "x.x.x" , this will not making yarn or npm searching for newer version of firebase packages which might be incompatible .
then install node_modules by yarn .
then cd ios and pod install .

@mikehardy
Copy link
Collaborator

...or just yarn upgrade --latest && npx pod-install so you are up to date, then npx react-native-clean-project so you're clean, then re-build and move on but enjoy the fixes for all the bugs that were squashed and created the new versions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: build-error Behaviour causing build failure Priority: P1 type: bug New bug report
Projects
None yet
Development

No branches or pull requests

6 participants