首页 > 解决方案 > 在 React 中安装 botframework-webchat 库时出错

问题描述

我正在尝试使用“botframework-webchat”库创建一个新的 React 应用程序,但在运行命令时出现以下错误npm install botframework-webchat

Run `npm audit` for details.
PS C:\Users\repo\custom_react> npm install botframework-webchat  
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: custom_react@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.8.6" from botframework-webchat@4.13.0
npm ERR! node_modules/botframework-webchat
npm ERR!   botframework-webchat@"*" 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.

谁能指导我如何解决这个错误?

标签: reactjsnpmbotframeworknpm-installweb-chat

解决方案


推荐阅读