4

I am trying to add the notification capabilities to my react-native app. Seems like react-native-firebase is the preferred way to go. But I don't want to install the complete module just for messaging. According to this: https://github.com/invertase/react-native-firebase/tree/master/packages/messaging I installed react-native-firebase/app and then react-native-firebase/messaging

npm install --save @react-native-firebase/app

npm install --save @react-native-firebase/messaging

Then I tried to link them with

react-native link react-native-firebase/app

react-native link react-native-firebase/messaging.

Both operations threw error Failed to get dependency config.

This page: https://invertase.io/oss/react-native-firebase/guides/integrating-push-notifications-using-fcm refers to a medium article and in this article the complete react-native-firebase package is installed. Is this the way to go? Is it wrong to try to achieve this only by installing the related sub-modules as I mentioned?

What am I doing wrong here? Thanks!

Edit: Here is the verbose output:

> debug Available platforms: iOS, Android debug Targeted platforms: iOS,
> Android debug Getting project config for iOS... debug Getting project
> config for Android... debug Package to link:
> react-native-firebase/messaging error Failed to get dependency config
> debug Error: Failed to get dependency config
>     at getDependencyConfig (/Users/user/ReactNativeProjects/project/node_modules/@react-native-community/cli/build/commands/link/getDependencyConfig.js:49:11)
>     at Object.link [as func] (/Users/user/ReactNativeProjects/project/node_modules/@react-native-community/cli/build/commands/link/link.js:97:61)
>     at Promise.resolve.then (/Users/user/ReactNativeProjects/project/node_modules/@react-native-community/cli/build/cliEntry.js:152:22)
>     at process._tickCallback (internal/process/next_tick.js:68:7)
>     at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
>     at startup (internal/bootstrap/node.js:283:19)
>     at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
uri2x
  • 3,162
  • 1
  • 11
  • 25
honor
  • 7,378
  • 10
  • 48
  • 76

0 Answers0