【问题标题】:React Native version mismatch JavaScript version :0.54.3 Native version:0.50.3React Native 版本不匹配 JavaScript 版本:0.54.3 Native 版本:0.50.3
【发布时间】:2018-03-29 01:30:47
【问题描述】:

为了解决另一个问题,我必须升级本机反应。我使用 `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"
  }
}

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

如果尝试执行 watchman cmd 说 watchman 未知

更新:

我更新了我的 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 无效,同样的错误。

【问题讨论】:

  • 是不是因为旧的packager 已经在运行?
  • 不,没有其他打包程序在运行。

标签: react-native expo


【解决方案1】:
"react-native": "https://github.com/expo/react-native/archive/sdk-24.0.0.tar.gz",

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

【讨论】:

    猜你喜欢
    • 2023-03-09
    • 1970-01-01
    • 2018-05-25
    • 2019-01-14
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 2017-12-11
    相关资源
    最近更新 更多