react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

react-native-safe-area-context dependency

Open ghost opened this issue 8 months ago • 6 comments

Appears to be added in v1.1311.0

It is a major version out-of-date (latest is 5.4.0, but the pinned version is 4.5.0)

Can it be marked as a peer dependency? Can it be marked as a compatible version range? (^5.0.0 or ^5.4.0)?

Without this, many projects will have this package duplicated.

ghost avatar Apr 17 '25 17:04 ghost

@Inbal-Tish this was added in your change: https://github.com/wix/react-native-calendars/pull/2607

cc @ethanshar

ghost avatar Apr 17 '25 19:04 ghost

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 18 '25 18:07 stale[bot]

Still an issue

andrejpavlovic avatar Aug 01 '25 16:08 andrejpavlovic

✖ Check that no duplicate dependencies are installed
Your project contains duplicate native module dependencies, which should be de-duplicated.
Native builds may only contain one version of any given native module, and having multiple versions of a single Native module installed may lead to unexpected build errors.
Found duplicates for react-native-safe-area-context:
  ├─ [email protected] (at: node_modules/react-native-safe-area-context)
  └─ [email protected] (at: node_modules/react-native-calendars/node_modules/react-native-safe-area-context)

dave-mp avatar Sep 12 '25 14:09 dave-mp

Add this to the root of your package.json @dave-mp @andrejpavlovic

{
  // ...
  "resolutions": { // <--- this is what actually fixed it for me
      "react-native-safe-area-context": "5.6.1"
    },
  "overrides": {
      "react-native-safe-area-context": "5.6.1"
  },
  // ...
}

I'm guessing there's a legit reason to pin a very outdated react-native-safe-area-context version as a dependency and not peerDependency, so something may break, but it's worth a try

Remember to do a clean install just in case...

You can find more information here: Resolving dependency issues in expo

enqqi avatar Sep 13 '25 10:09 enqqi

Add this to the root of your package.json @dave-mp @andrejpavlovic

{ // ... "resolutions": { // <--- this is what actually fixed it for me "react-native-safe-area-context": "5.6.1" }, "overrides": { "react-native-safe-area-context": "5.6.1" }, // ... }

I'm guessing there's a legit reason to pin a very outdated react-native-safe-area-context version as a dependency and not peerDependency, so something may break, but it's worth a try

Remember to do a clean install just in case...

You can find more information here: Resolving dependency issues in expo

This doesn't fix the issue for me, I'm unable to build my app, even after adding resolutions and overrides

NathanaelAma avatar Sep 19 '25 13:09 NathanaelAma