我已经尝试了上一个线程中的所有答案,但它们没有工作 无法解析“@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/
有人找到解决办法了吗?
expo文档说react导航使用@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