【问题标题】:Unable to resolve module @react-native-masked-view/masked-view 2021无法解析模块 @react-native-masked-view/masked-view 2021
【发布时间】:2021-10-13 16:33:23
【问题描述】:

我已经尝试了上一个帖子中的所有答案,但都没有奏效 Unable to resolve "@react-native-community/masked-view

我无法以任何身份构建我的应用程序。使用 expo ~42.0.0 来管理安装。

Unable to resolve module @react-native-masked-view/masked-view from 
/node_modules/@react-navigation/elements/src/MaskedViewNative.tsx

这是他们主分支上的那个文件 https://github.com/react-navigation/react-navigation/blob/main/packages/elements/src/MaskedViewNative.tsx

只是好奇这个错误是什么意思,世博会文档说反应导航使用@react-native-community/masked-view 这个错误和最新版本中的代码说其他方式 https://docs.expo.dev/versions/latest/sdk/masked-view/

有人找到解决办法了吗?

【问题讨论】:

    标签: react-native expo react-navigation


    【解决方案1】:

    expo 文档说反应导航使用 @react-native-community/masked-view

    Expo 文档说 React Navigation 5.x 使用 @react-native-community/masked-view。你可能使用的是 React Navigation 6.x,而不是 React Navigation 5.x。但是,如果您因为缺少特定包并且您已经知道它是哪个包而收到错误,那么 Expo 文档中的内容并不重要。

    你需要安装@react-native-masked-view/masked-view:

    expo install @react-native-masked-view/masked-view
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-11
      • 2016-03-23
      • 1970-01-01
      • 2018-11-18
      • 1970-01-01
      • 2020-04-15
      • 2020-03-02
      • 2016-12-27
      相关资源
      最近更新 更多