React Native version mismatch JavaScript version:0.54.3 Native version:0.50.3

时间:2018-03-28 16:39:54

标签: react-native expo

解决另一个问题我必须升级反应原生。我使用`react-native-git-upgrade 0.54.3`进行更新。是否有任何想法升级原生品种?

为了开始我的项目,我使用了create-react-native-app

我的package.json包含:

{
  "name": "########",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "jest-expo": "23.0.0",
    "react-native-scripts": "1.8.1",
    "react-test-renderer": "16.0.0"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "node node_modules/jest/bin/jest.js --watch"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^6.3.1",
    "exp": "^47.4.4",
    "expo": "^23.0.4",
    "react": "16.3.0-alpha.1",
    "react-native": "0.54.3",
    "react-native-swiper": "^1.5.13",
    "react-navigation": "^1.5.8"
  }
}

图像非常准确地描述了我的问题。

The image is describing my problem very exactly

如果尝试执行守望者,cmd表示守望者未知

更新:

我更新了我的package.json:

{
  "name": "ProdPrototype",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "jest-expo": "^25.1.0",
    "react-native-scripts": "^1.11.1",
    "react-test-renderer": "^16.2.0"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "node node_modules/jest/bin/jest.js --watch"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^6.3.1",
    "connect": "^3.6.6",
    "exp": "^50.0.5",
    "expo": "^25.0.0",
    "react": "16.0.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-24.0.0.tar.gz",
    "react-native-swiper": "^1.5.13",
    "react-navigation": "^1.5.8"
  }
}

删除了node_modules并且运行npm install没有用,同样的错误。

1 个答案:

答案 0 :(得分:0)

"react-native": "https://github.com/expo/react-native/archive/sdk-24.0.0.tar.gz",

将此行放在package.json文件中的依赖项中