每当我尝试安装引擎时,它都会给我带来这个错误。
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: chat-app-jsm@0.1.0
npm ERR! Found: react@18.2.0
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 react-chat-engine@1.11.23
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我该怎么办?
发布于 2022-09-15 12:35:09
您要安装的包具有react@16依赖性,但是您的项目是在react@18上构建的。
尝试以下命令:
npm i react-chat-engine --legacy-peer-deps
npm i react-chat-engine --forcehttps://stackoverflow.com/questions/73731102
复制相似问题