0

If i want to add "npm install @react-native-community/async-storage" in the terminal. There is this error and i dont know why.

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR!

npm ERR! While resolving: undefined@undefined

npm ERR! Found: [email protected]

npm ERR! node_modules/react

npm ERR! react@"^16.13.0" from the root project

npm ERR! peer react@"^16.8" from @react-native-community/[email protected]

npm ERR! node_modules/@react-native-community/async-storage

npm ERR! @react-native-community/async-storage@"*" from the root project

npm ERR!

npm ERR! Could not resolve dependency:

npm ERR! peer react@"18.1.0" from [email protected]

npm ERR! node_modules/react-native

npm ERR! peer react-native@">=0.59" from @react-native-community/[email protected]

kjf Is it maybe of my react version. If yes how can I change my version

1
  • what is your current react version? in package.json Commented Nov 17, 2022 at 5:50

2 Answers 2

0

you have to change your react version to resolve this error.

using npm install react@[version] --save cmmand you can change your react Version.

Sign up to request clarification or add additional context in comments.

4 Comments

Do you know which version i need?
try 18.0.0 it's worked for me. npm install [email protected] --save
it didnt work for me :/
share me your package.json
0

Try using this @react-native-async-storage/async-storage package

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.