在我的测试项目中,在React 18:NPM安装失败的情况下,我尝试在我的测试项目中安装连接的反应器时遇到了问题:
npm err!找到: [email  prectioned]
npm err! node_modules/react
npm err! React@“^18.1.0”来自root Project
npm err!
npm err!无法解决依赖关系
npm err! peer react@“ ^16.4.0 || ^17.0.0”来自
或类似的包裹
connected-reactected-react-router 的存储库中那是:
v6.0.0要求react v16.4.0和react redux v6.0 / v7.0。< / p>
所以,我有问题:1)维持连接的反应 - 依据吗?上次提交的日期是7个月前; 2)在React 18项目中是否有类似的软件包可以连接路由器?还是React 18中添加的任何内置功能?
当然,将React路由器连接到Redux Store一点都不困难,但是我对现成的解决方案感兴趣。另外,我一直在搜索该主题,但找不到任何信息。预先感谢您的答案。
I have encountered a problem when trying to install connected-react-router in my test project on React 18: npm installation fails with an error:
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency
npm ERR! peer react@"^16.4.0 || ^17.0.0" from [email protected]
or similar packages with
I found information in the repository of connected-react-router
that:
v6.0.0 requires React v16.4.0 and React Redux v6.0 / v7.0.
So, I have questions: 1) is connected-react-router maintained? The date of last commits is 7 months ago; 2) are there any similar packages to connect router in React 18 project? Or any inbuilt functionality added in React 18?
Of course, connecting React router to Redux store manually is not difficult at all, but I'm interested in ready solutions. Also I have been searching on the topic, but I can't find any info. Thanks in advance for answers.
发布评论
评论(1)
只是把那个旗帜忽略旧的反应经文
npm i连接反应 - 旋转 - 掌per-deps
just put that flag to ignore the old react verison
npm i connected-react-router --legacy-peer-deps