无法解决“node_modules / react-native-router-flux / dist / Router.js”中的“mobx-react / native”

时间:2018-06-16 09:22:28

标签: react-native expo react-native-router-flux

我正在使用世博会。

这是我的package.json文件

{
    "name": "emmunize",
    "version": "0.1.0",
    "private": true,
    "devDependencies": {
        "jest-expo": "27.0.0",
        "react-native-scripts": "^1.14.1",
        "react-test-renderer": "16.3.0-alpha.1"
    },
    "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": "jest"
    },
    "jest": {
        "preset": "jest-expo"
    },
    "dependencies": {
        "@expo/vector-icons": "^6.3.1",
        "expo": "^27.0.0",
        "firebase": "^5.0.2",
        "moment": "^2.22.2",
        "native-base": "^2.5.2",
        "react": "16.3.1",
        "react-native": "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz",
        "react-native-datepicker": "^1.7.2",
        "react-native-router-flux": "^4.0.0-beta.32",
        "react-redux": "^5.0.7",
        "redux": "^4.0.0",
        "redux-thunk": "^2.2.0"
    }
}

我不知道发生了什么,当我尝试exp启动和exp android这个错误贴出来。我已经关注了最新的exp版本27 https://blog.expo.io/expo-sdk-v27-0-0-is-now-available-898bf1e5b0e4,但我认为react-native-router-flux与最新的expo版本存在问题?

1 个答案:

答案 0 :(得分:0)

当我创建一个新项目时,我遇到了同样的问题。由于这是新的测试版,我们应该等到小组可以解决这个错误。

临时解决方案

  • 打开终端
  • 转到项目路径...示例:user / Documents / ReactNative /(命名您的项目)/
  • 运行命令:npm remove react-native-router-flux
  • 运行命令:npm install react-native-router-flux@4.0.0-beta.28
  • 再次运行项目以尝试

react-native-router-flux@4.0.0-beta.28是我在上一个项目中使用的版本并且工作正常。