如何解决TAWK的依赖性错误与React 18.1.0聊天NPM软件包?
我正在尝试安装tawk从。但是我会收到以下错误,如下所示。我担心如果我选择有力地安装它,它会弄乱我的代码库。我该如何解决?
错误日志URL- https://termbin.com/4q35
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-dom
npm ERR! react-dom@"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-dom@"^17.0.2" from @tawk.to/[email protected]
npm ERR! node_modules/@tawk.to/tawk-messenger-react
npm ERR! @tawk.to/tawk-messenger-react@"*" 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 /home/somaya/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/somaya/.npm/_logs/2022-05-07T19_08_49_501Z-debug-0.log
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来像
@tawk.to/tawk-messenger-react@
软件包与react-dom 18不兼容。Looks like
@tawk.to/tawk-messenger-react@
package isn't compatible with react-dom 18. Try usingreact-dom@"^17.0.2"
尝试运行
npm install< depentencyName> - force
或npm install< depentencyName> - legacy-peer-deps
如果不工作的工作删除节点模块并再次安装软件包,则
如果也不起作用,则必须降级
react> react
和react> react> react-dom < /代码>版本
try running
npm install <dependencyName> --force
ornpm install <dependencyName> --legacy-peer-deps
if that doesnt work remove node modules and install packages again
if that also doesnt work then you will have to downgrade your
react
andreact-dom
versionsIf you're using react 18.1.0 you should use
@tawk.to/[电子邮件&nbsp;受保护]
基于您提供的错误,您正在使用
@tawk.to/ [email&nbsp; protiveed]
支持您使用的版本的17和冲突。我们的Messenger版本
1。*。*
支持 React 17版本
2。*。*
用于支持 React 18If you're using react 18.1.0 you should use
@tawk.to/[email protected]
Base on the error you provide you are using
@tawk.to/[email protected]
which supports react 17 and conflict on version you are using.Our messenger version
1.*.*
is supporting react 17and version
2.*.*
for supporting react 18