如何解决TAWK的依赖性错误与React 18.1.0聊天NPM软件包?

发布于 2025-01-27 09:45:28 字数 1614 浏览 5 评论 0 原文

我正在尝试安装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

I am trying to install tawk to chat npm package from https://github.com/tawk/tawk-messenger-react. But I get the following error as attached below. I fear if I choose to install it forcefully, it will mess up my code-base. How can I solve it?

error log 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

新雨望断虹 2025-02-03 09:45:28

看起来像@tawk.to/tawk-messenger-react@软件包与react-dom 18不兼容。

Looks like @tawk.to/tawk-messenger-react@ package isn't compatible with react-dom 18. Try using react-dom@"^17.0.2"

_失温 2025-02-03 09:45:28

尝试运行 npm install< depentencyName> - force npm install< depentencyName> - legacy-peer-deps

如果不工作的工作删除节点模块并再次安装软件包,则

如果也不起作用,则必须降级 react> react react> react> react-dom < /代码>版本

try running npm install <dependencyName> --force or npm 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 and react-dom versions

Saygoodbye 2025-02-03 09:45:28

If 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 18

If 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 17
and version 2.*.* for supporting react 18

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文