我正在尝试安装react-paystack,我得到了这个错误
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: myfapp@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@"^15.0.0 || ^16.0.0" from react-paystack@3.0.4
npm ERR! node_modules/react-paystack
npm ERR! react-paystack@"*" 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\Jeffrey Matthew\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\Jeffrey Matthew\AppData\Local\npm-cache\_logs\2021-08-12T05_04_04_535Z-debug.log有什么解决方案吗?
发布于 2021-08-12 17:46:29
我认为原因很清楚。安装的react版本为17.0.2,而as react-paystack 3.0.4需要旧版本(16.x)。
由于当前的react-paystack只能在react 16.x上运行,我认为唯一的方法是使用16.x版本创建react项目,然后重试。
发布于 2021-08-12 18:11:46
父文件夹中可能有另一个node_modules文件夹或package.json文件。
https://stackoverflow.com/questions/68761960
复制相似问题