skip to Main Content

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

2

Answers


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

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

    Login or Signup to reply.
  2. Try using this @react-native-async-storage/async-storage package

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search