Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 如何解决本机版本不匹配错误_React Native_Expo - Fatal编程技术网

React native 如何解决本机版本不匹配错误

React native 如何解决本机版本不匹配错误,react-native,expo,React Native,Expo,我目前正在做一个expo(react native)项目,然后我停下来安装一个新的包(momentjs),因为那时我无法继续,我一直收到这个错误。我已经卸载了这个软件包,仍然没有出路 下面是我的package.json { "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start",

我目前正在做一个expo(react native)项目,然后我停下来安装一个新的包(momentjs),因为那时我无法继续,我一直收到这个错误。我已经卸载了这个软件包,仍然没有出路

下面是我的package.json

  {


"main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@react-native-community/async-storage": "~1.11.0",
    "@react-native-community/datetimepicker": "2.4.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/bottom-tabs": "^5.8.0",
    "@react-navigation/drawer": "^5.9.0",
    "@react-navigation/material-top-tabs": "^5.2.16",
    "@react-navigation/native": "^5.7.3",
    "@react-navigation/stack": "^5.9.0",
    "@simdanonline/react-native-rave": "^1.0.5",
    "axios": "^0.20.0",
    "expo": "~38.0.8",
    "expo-auth-session": "~1.4.0",
    "expo-av": "~8.2.1",
    "expo-image-picker": "~8.3.0",
    "expo-status-bar": "^1.0.2",
    "native-base": "^2.13.14",
    "react": "~16.13.1",
    "react-dom": "~16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
    "react-native-elements": "^2.3.0",
    "react-native-gesture-handler": "~1.6.0",
    "react-native-reanimated": "~1.9.0",
    "react-native-safe-area-context": "~3.0.7",
    "react-native-screens": "~2.9.0",
    "react-native-tab-view": "^2.15.1",
    "react-native-web": "~0.13.9",
    "react-native-webview": "9.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.8.6",
    "babel-preset-expo": "~8.2.3"
  },
  "private": true
}
下面是我的app.json

{


"expo": {
    "name": "simtwit",
    "slug": "simtwit",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "scheme": "simtwit"
  }
}
我的npm版本6.14.8

我的节点版本是12.18.3


纱线1.21.1

你尝试过清除缓存吗?是的,做了多次,并且重新启动了你的机器?@similolluwaodeyemi我仍然认为这是缓存问题,尝试清理模拟器和终端。有时重新启动电脑修复程序会清除缓存并重新启动电脑几次,同样的错误