【问题标题】:How can I install UI Kitten on Expo?如何在 Expo 上安装 UI Kitten?
【发布时间】:2021-05-20 21:23:05
【问题描述】:

我正在尝试在我的项目中使用 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

【问题讨论】:

    标签: react-native expo react-native-ui-kitten


    【解决方案1】:

    错误地明确显示react-native-svg@"^9.13.6"kitten UI 使用的是上述版本,而您的项目使用12.1.0 使用kitten UI 您需要使用react-native-svg@"^9.13.6" 版本。

    【讨论】:

    • 即使使用expo install @ui-kitten/eva-icons @eva-design/eva @ui-kitten/components react-native-svg@9.13.6,我也会遇到同样的错误
    【解决方案2】:

    NPM 7 对此负责。 运行它应该可以解决它:

    npm install -g npm@6
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-04-19
      • 2021-03-04
      • 2020-07-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-13
      相关资源
      最近更新 更多