首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装react引擎面临的问题

安装react引擎面临的问题
EN

Stack Overflow用户
提问于 2022-09-15 12:25:04
回答 1查看 83关注 0票数 1

每当我尝试安装引擎时,它都会给我带来这个错误。

代码语言:javascript
复制
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

我该怎么办?

EN

回答 1

Stack Overflow用户

发布于 2022-09-15 12:35:09

您要安装的包具有react@16依赖性,但是您的项目是在react@18上构建的。

尝试以下命令:

代码语言:javascript
复制
npm i react-chat-engine  --legacy-peer-deps 

npm i react-chat-engine  --force
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73731102

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档