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

cre*_*lus 5 npm react-native native-base expo

我正在将本机基础添加到我现有的 Expo React 项目中。我已经按照安装指南中的描述添加了必要的包,但是每次出现此错误时,我都会尝试多次迭代安装和卸载、删除节点模块并再次运行它,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"
},
Run Code Online (Sandbox Code Playgroud)

cre*_*lus 1

向 Native Base 创建者询问了此事:https ://github.com/GeekyAnts/NativeBase/issues/4011

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