clipboard icon indicating copy to clipboard operation
clipboard copied to clipboard

Allowing RN 0.74 as a peer dependency

Open naftalibeder opened this issue 2 years ago • 25 comments

Would you accept a PR updating the peer dependencies to include "react-native": "... || ^0.74.0"? The library works fine on 0.74, but throws an error on dependency installation at the moment.

naftalibeder avatar Apr 29 '24 19:04 naftalibeder

I have the same issue.

sargsyanapach94 avatar May 01 '24 13:05 sargsyanapach94

Same problem

davidgvf avatar May 02 '24 08:05 davidgvf

npm update

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native
npm ERR!   react-native@"0.74.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.61.5 || ^0.62.3 || ^0.63.2 || ^0.64.2 || ^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.69.0 || ^0.70.0 || ^0.71.0 || ^0.72.0 || ^0.73.0" from @react-native-clipboard/[email protected]
npm ERR! node_modules/@react-native-clipboard/clipboard
npm ERR!   @react-native-clipboard/clipboard@"^1.14.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

cixio avatar May 02 '24 14:05 cixio

How I fixed in the interim for my app... add dependency version overrides in my app's package.json:

  "overrides": {
    "@react-native-clipboard/clipboard": {
      "react-native": "~0.74.0",
      "react-native-windows": "~0.74.0"
    }
  },

BrandonSmith avatar May 02 '24 15:05 BrandonSmith

How I fixed in the interim for my app... add dependency version overrides in my app's package.json:

  "overrides": {
    "@react-native-clipboard/clipboard": {
      "react-native": "~0.74.0",
      "react-native-windows": "~0.74.0"
    }
  },

Doesn't seems to work

codetobuild avatar May 06 '24 06:05 codetobuild

Any fix?

MuhammadRafeh avatar May 07 '24 11:05 MuhammadRafeh

How I fixed in the interim for my app... add dependency version overrides in my app's package.json:

  "overrides": {
    "@react-native-clipboard/clipboard": {
      "react-native": "~0.74.0",
      "react-native-windows": "~0.74.0"
    }
  },

Doesn't seems to work

Removing package-lock.json and rm -rf ./node_modules is what I use when updating overrides

geoffrey-tan avatar May 07 '24 15:05 geoffrey-tan

I have this issue also with react-native: 0.71.2.

ToniNikolaev23 avatar May 15 '24 10:05 ToniNikolaev23

I have the same issue on React Native 0.72.14

$ npm install --save @react-native-clipboard/clipboard
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react-native
npm error   react-native@"0.72.14" from the root project
npm error   peer react-native@"^0.61.5 || ^0.62.3 || ^0.63.2 || ^0.64.2 || ^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.69.0 || ^0.70.0 || ^0.71.0 || ^0.72.0 || ^0.73.0" from @react-native-clipboard/[email protected]
npm error   node_modules/@react-native-clipboard/clipboard
npm error     @react-native-clipboard/clipboard@"*" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react-native@"^0.73.0" from [email protected]
npm error node_modules/react-native-windows
npm error   peer react-native-windows@"^0.61.0 || ^0.62.0 || ^0.63.0 || ^0.64.0 || ^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.69.0 || ^0.70.0 || ^0.71.0 || ^0.72.0 || ^0.73.0" from @react-native-clipboard/[email protected]
npm error   node_modules/@react-native-clipboard/clipboard
npm error     @react-native-clipboard/clipboard@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

I guess it's on all React Native versions

OmarThinks avatar May 19 '24 11:05 OmarThinks

Same issue !!!

EducoreAPK avatar May 28 '24 07:05 EducoreAPK

After the change, the npm package is installed ok but when running pod install --repo-update, I get

 Invalid `RNCClipboard.podspec` file: undefined method `visionos' for #<Pod::Specification name="RNCClipboard">

LPitonakova avatar Jun 03 '24 19:06 LPitonakova

npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice To update run: npm install -g [email protected]
npm notice
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react-native
npm error   react-native@"0.72.0" from the root project
npm error   peer react-native@"^0.61.5 || ^0.62.3 || ^0.63.2 || ^0.64.2 || ^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.69.0 || ^0.70.0 || ^0.71.0 || ^0.72.0 || ^0.73.0" from @react-native-clipboard/[email protected]
npm error   node_modules/@react-native-clipboard/clipboard
npm error     @react-native-clipboard/clipboard@"^1.11.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react-native@"^0.73.0" from [email protected]
npm error node_modules/react-native-windows
npm error   peer react-native-windows@"^0.61.0 || ^0.62.0 || ^0.63.0 || ^0.64.0 || ^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.69.0 || ^0.70.0 || ^0.71.0 || ^0.72.0 || ^0.73.0" from @react-native-clipboard/[email protected]
npm error   node_modules/@react-native-clipboard/clipboard
npm error     @react-native-clipboard/clipboard@"^1.11.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/chenlong/.npm/_logs/2024-06-04T02_39_56_054Z-eresolve-report.txt

npm error A complete log of this run can be found in: /Users/chenlong/.npm/_logs/2024-06-04T02_39_56_054Z-debug-0.log

Also face the same issue.

arlovip avatar Jun 04 '24 02:06 arlovip

okay, ill just use --force argument in npm then

GoldenBilly avatar Jun 06 '24 17:06 GoldenBilly

i know it may be not that good idea, but i need this lib

GoldenBilly avatar Jun 06 '24 17:06 GoldenBilly

helped for me to fix ERESOLVE error when i use npm i in cloned repository

How I fixed in the interim for my app... add dependency version overrides in my app's package.json:

  "overrides": {
    "@react-native-clipboard/clipboard": {
      "react-native": "~0.74.0",
      "react-native-windows": "~0.74.0"
    }
  },

GoldenBilly avatar Jun 06 '24 17:06 GoldenBilly

Same issue here for RN 0.71.14

ezescigo avatar Jun 20 '24 15:06 ezescigo

Same for me

Catnais88 avatar Jun 27 '24 09:06 Catnais88

Any solutions?

sudhanshu-busy avatar Jul 02 '24 06:07 sudhanshu-busy

Any solutions?

Until they fix it, temp fix is the override posted above

ezescigo avatar Jul 02 '24 06:07 ezescigo

Any solutions?

Until they fix it, temp fix is the override posted above

how to do it pls write steps my react native version is 0.70.3

sudhanshu-busy avatar Jul 02 '24 06:07 sudhanshu-busy

Any solutions?

Until they fix it, temp fix is the override posted above

how to do it pls write steps my react native version is 0.70.3

open your project, go to your package json, add that:

  "overrides": {
    "@react-native-clipboard/clipboard": {
      "react-native": "~0.70.3",
      "react-native-windows": "~0.70.3"
    }
  },

then use npm i @react-native-clipboard/clipboard (i didnt tested it, but it should help)

GoldenBilly avatar Jul 04 '24 06:07 GoldenBilly

Any solutions?

Until they fix it, temp fix is the override posted above

how to do it pls write steps my react native version is 0.70.3

open your project, go to your package json, add that:

  "overrides": {
    "@react-native-clipboard/clipboard": {
      "react-native": "~0.70.3",
      "react-native-windows": "~0.70.3"
    }
  },

then use npm i @react-native-clipboard/clipboard (i didnt tested it, but it should help)

It didn't work I had tried earlier what I did is used some old version of this lib that is used in example of this project. It installed successfully, is it fine?

sudhanshu-busy avatar Jul 04 '24 06:07 sudhanshu-busy

Any solutions?

Until they fix it, temp fix is the override posted above

how to do it pls write steps my react native version is 0.70.3

open your project, go to your package json, add that:

  "overrides": {
    "@react-native-clipboard/clipboard": {
      "react-native": "~0.70.3",
      "react-native-windows": "~0.70.3"
    }
  },

then use npm i @react-native-clipboard/clipboard (i didnt tested it, but it should help)

It didn't work I had tried earlier what I did is used some old version of this lib that is used in example of this project. It installed successfully, is it fine?

i cant say will it work or not, you should test it in your project we just overriding dependencies of this lib, so we can install it

GoldenBilly avatar Jul 04 '24 06:07 GoldenBilly

its same if we use just npm install @react-native-clipboard/clipboard --force

GoldenBilly avatar Jul 04 '24 06:07 GoldenBilly

Any solutions?

Until they fix it, temp fix is the override posted above

how to do it pls write steps my react native version is 0.70.3

open your project, go to your package json, add that:

  "overrides": {
    "@react-native-clipboard/clipboard": {
      "react-native": "~0.70.3",
      "react-native-windows": "~0.70.3"
    }
  },

then use npm i @react-native-clipboard/clipboard (i didnt tested it, but it should help)

It didn't work I had tried earlier what I did is used some old version of this lib that is used in example of this project. It installed successfully, is it fine?

other option is just using npm i --legacy-peer-deps

ezescigo avatar Jul 04 '24 07:07 ezescigo

This worked for me going through the error logs on react native version 0.74.3

newArchEnabled=true hermesEnabled=true

root/node_modules/@react-native-clipboard/clipboard/android/src/main/java/com/reactnativecommunity/clipboard/ClipboardModule.java

Edit line 241: remove @Override public void removeListeners(int count) {

}

add @Override public void removeListeners(double count) {

}

joshticks002 avatar Jul 17 '24 13:07 joshticks002

Same issue

AlexLFundbox avatar Aug 06 '24 05:08 AlexLFundbox

Same issue

tadokorokantoku avatar Aug 07 '24 07:08 tadokorokantoku

i just run

npm install --save @react-native-clipboard/clipboard --force

and that's fix my problem, but i think is not best practice. maybe we just need to wait for latest version that supported in react native 0.74^

IndraMyn avatar Aug 12 '24 15:08 IndraMyn

This worked for me going through the error logs on react native version 0.74.3

newArchEnabled=true hermesEnabled=true

root/node_modules/@react-native-clipboard/clipboard/android/src/main/java/com/reactnativecommunity/clipboard/ClipboardModule.java

Edit line 241: remove

@OverRide public void removeListeners(int count) {
}

add

@OverRide public void removeListeners(double count) {
}

This seems to be proper solution.

Its working for me👍. my config, newArchEnabled=true hermesEnabled=true [email protected]

YashM20 avatar Aug 20 '24 10:08 YashM20