0

我正在尝试在我的项目中使用 UI Kitten,但不知道如何在 Expo 上安装 UI Kitten。

expo install @ui-kitten/eva-icons @eva-design/eva @ui-kitten/components react-native-svg

错误:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react-native-svg@12.1.0
npm ERR! node_modules/react-native-svg
npm ERR!   react-native-svg@"12.1.0" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-svg@"^9.13.6" from @ui-kitten/components@5.1.0
npm ERR! node_modules/@ui-kitten/components
npm ERR!   @ui-kitten/components@"*" from the root project
npm ERR!   peer @ui-kitten/components@"5.1.0" from @ui-kitten/eva-icons@5.1.0
npm ERR!   node_modules/@ui-kitten/eva-icons
npm ERR!     @ui-kitten/eva-icons@"*" from the root project
4

2 回答 2

0

错误地清楚地表明react-native-svg@"^9.13.6"小猫 UI 正在使用上述版本,而您的项目正在使用12.1.0您需要使用的小猫 UIreact-native-svg@"^9.13.6" 版本。

于 2021-05-21T04:08:16.140 回答
0

由 NPM 7 负责。运行它应该修复它:

npm install -g npm@6
于 2021-08-10T14:15:21.667 回答