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

Installation error #255

Open
WeiTeck13 opened this issue Aug 27, 2024 · 9 comments
Open

Installation error #255

WeiTeck13 opened this issue Aug 27, 2024 · 9 comments
Labels
question Further information is requested

Comments

@WeiTeck13
Copy link

I perform npm install --save @react-native-clipboard/clipboard and receive the following error:

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
npm error   react@"18.3.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"16.9.0 || 16.11.0 || 16.13.1 || 17.0.1 || 17.0.2 || 18.0.0 || 18.1.0 || 18.2.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.
npm error
npm error
npm error For a full report see:
npm error C:\Users\user\AppData\Local\npm-cache\_logs\2024-08-27T03_25_35_903Z-eresolve-report.txt

npm error A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache\_logs\2024-08-27T03_25_35_903Z-debug-0.log

I am not very sure why this happens. Can you please help me? Thank you.

@WeiTeck13 WeiTeck13 added the question Further information is requested label Aug 27, 2024
@tommmoe
Copy link

tommmoe commented Aug 27, 2024

wow, bots.

Also this error means that the package has a dependency on older versions of React, the latest version 18.3.1 isn't supported yet, which sucks, I'm also in the same boat.

edit looks like you can still use the old API method, I don't think it's being removed until React 19
https://reactnative.dev/docs/clipboard

@AktilaCengiz
Copy link

How can be use this? I can't install this package other core package is a deprecated. How can i add ?

@vishalsohani27
Copy link

just go with --legacy-peer-deps. i know its not good way. but go head is better then stuck.. hope in next version it will be resolved.

@kneel2023
Copy link

If you’re encountering issues with React Native versions above 0.73, consider trying an alternative package like expo-clipboard (available at npm).

Alternatively, you could downgrade React Native to version 0.73.0 to avoid these issues, but be aware that this may introduce other errors or compatibility problems.

@felansu
Copy link

felansu commented Sep 11, 2024

I don't understand nothing, here in https://reactnative.dev/docs/clipboard version 0.75 says:

Removed. Use one of the community packages instead.

But you try to use the react-native-clipboard/clipboard in version 0.75, says is not compatible?

@kneel2023
Copy link

kneel2023 commented Sep 11, 2024

I don't understand nothing, here in https://reactnative.dev/docs/clipboard version 0.75 says:

Removed. Use one of the community packages instead.

But you try to use the react-native-clipboard/clipboard in version 0.75, says is not compatible?

Can you explain more about what you are facing ?

seems like you are referring to 0.75 version of react native

try : https://www.npmjs.com/package/expo-clipboard

image

@felansu
Copy link

felansu commented Sep 11, 2024

Im using https://react-native-community.github.io/upgrade-helper/?from=0.74.5&to=0.75.2

"react": "18.3.1",
"react-native": "0.75.2"

and i don't use expo

-- Extra --
if like to know why, that is what i think

@felansu
Copy link

felansu commented Sep 11, 2024

just found that fork https://github.com/bravetechnologycoop/clipboard-react-18.3
is that what need to do? bravetechnologycoop@7547b67

@kneel2023
Copy link

and i don't use expo

-- Extra -- if like to know why, that is what i think

I understand that you don't use Expo, and that's perfectly fine—it's a matter of personal preference whether you choose React Native CLI or Expo.

However, it's worth noting that the landscape for Expo has evolved significantly over the past four years. If you're interested, you can read more about these changes and how Expo has improved:

A Reddit discussion from 2024 about who is using Expo
Another discussion highlighting how Expo has evolved
[To Expo or not to Expo?]
https://www.reddit.com/r/reactnative/comments/1dejx21/to_expo_or_not_to_expo/
These resources provide insight into how Expo has grown and the benefits it now offers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

10 participants
@felansu @tommmoe @AktilaCengiz @vishalsohani27 @WeiTeck13 @kneel2023 and others