Maccoy Graham
Maccoy Graham

Reputation: 9

facing problem installing react chat engine

whenever i try to install react-chat-engine it is giving me this error

PS C:\Users\HP\Desktop\React\Chat_App\chat-app-jsm> npm install react-chat-engine
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@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.1" from [email protected]
npm ERR! node_modules/react-chat-engine
npm ERR!   react-chat-engine@"*" 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.
npm ERR!
npm ERR! See C:\Users\HP\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Local\npm-cache\_logs\2022-09-15T11_58_58_927Z-debug-0.log

what should I do?

Upvotes: 0

Views: 462

Answers (1)

Moein Moeinnia
Moein Moeinnia

Reputation: 2341

The package you are trying to install has react@16 dependency but your project is built on react@18.

Try out this commands:

npm i react-chat-engine  --legacy-peer-deps 

npm i react-chat-engine  --force

Upvotes: 0

Related Questions