gpt4 book ai didi

javascript - 你好,在我的博览会项目中安装 DateTimePicker (React native)

转载 作者:行者123 更新时间:2023-12-04 07:43:33 25 4
gpt4 key购买 nike

正如标题所示,我正在尝试安装 DateTimePicker,但出现此错误:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react@16.13.1
npm ERR! node_modules/react
npm ERR! react@"16.13.1" from the root project
npm ERR! peer react@">=16.8.3" from @react-native-community/datetimepicker@3.0.4
npm ERR! node_modules/@react-native-community/datetimepicker
npm ERR! @react-native-community/datetimepicker@"3.0.4" from the root project
npm ERR! 1 more (react-native)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.1" from react-native-windows@0.64.5
npm ERR! node_modules/react-native-windows
npm ERR! peer react-native-windows@">=0.62" from @react-native-community/datetimepicker@3.0.4
npm ERR! node_modules/@react-native-community/datetimepicker
npm ERR! @react-native-community/datetimepicker@"3.0.4" 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\robbi\AppData\Local\npm-cache\eresolve-report.txt for a full report.

我能怎么做?
抱歉这个愚蠢的问题,但我还在学习..

最佳答案

如果您使用的是 expo,请通过以下方式下载您的依赖项

expo install @react-native-community/datetimepicker
如果您使用了 yarn 或 npm,那么某些依赖项可能会相互冲突(由于不兼容问题),而通过 expo install 它将根据您的 expo 版本安装相应版本的软件包

关于javascript - 你好,在我的博览会项目中安装 DateTimePicker (React native),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67322279/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com