找不到模块:无法解析“@react-aria/interactions”

Module not found: Can't resolve '@react-aria/interactions'

我正在将本机基础添加到我现有的 expo react 项目中。我已经按照 installation guide 中的描述添加了必要的包,但每次出现此错误时,我都尝试了多次迭代安装和卸载,删除节点模块并再次 运行,添加 react-aria 直接(仅包括 @react-aria/interactions),但随后我总是在添加每个包时收到新错误。

大多数堆栈溢出帖子的建议似乎是“删除节点模块并重试”,但这对我没有影响。

我的 package.json 非常简单:

"dependencies": {
"@react-native-community/masked-view": "0.1.10",
"@react-native-community/slider": "^3.0.3",
"@react-navigation/drawer": "^5.12.4",
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.14.3",
"expo": "~39.0.2",
"expo-ads-admob": "~8.3.0",
"expo-cli": "^4.2.1",
"expo-status-bar": "~1.0.2",
"firebase": "^7.9.0",
"mobx": "^6.1.7",
"mobx-react": "^7.1.0",
"native-base": "^3.1.0",
"prop-types": "^15.7.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz",
"react-native-elements": "^3.2.0",
"react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "^3.1.4",
"react-native-screens": "~2.10.1",
"react-native-svg": "12.1.0",
"react-native-vector-icons": "^8.1.0",
"react-native-web": "~0.13.12",
"styled-components": "^5.3.1",
"styled-system": "^5.1.5",
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/core": "~7.9.0",
"@expo/webpack-config": "^0.15.0",
"eslint": "^7.32.0",
"eslint-plugin-react": "^7.25.1",
"eslint-plugin-react-native": "^3.11.0",
"json-server": "^0.16.3"
},

向 Native Base 创作者询问:https://github.com/GeekyAnts/NativeBase/issues/4011

基本上他们说只有使用 npm 而不是 yarn 才有问题,所以他们要求我们现在使用 yarn。