Home > Net >  In react-native error while doing npm install gettng below
In react-native error while doing npm install gettng below

Time:12-17

Today i want to install this lib.

But unfortunately I got the following error.

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 npm ERR! react@"17.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.1" from [email protected] npm ERR! node_modules/react-native-character-input npm ERR!
react-native-character-input@"*" 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.

What does this mean that the version of the my react-native is incompatible with this lib?

CodePudding user response:

You have dependency conflict (incorrect and potentially broken dependency) as it says, so try to run the command with --force, or --legacy-peer-deps. If it doesn't take effect, the temporary solution is using prior versions of the Node.js (downgrading the Node.js version) as it causes this kind of errors to happen sometimes.

CodePudding user response:

try npm install --legacy-peer-deps react-native-character-input --save

  • Related