无法从“ node_modules / react-redux / lib / index.js”解析“ ./components/connect”

时间:2019-04-25 14:22:12

标签: reactjs react-native react-redux expo

我已使用react-native初始化了一个新的expo-cli应用。

在安装了一些依赖项之后,我在构建时遇到此错误:

Unable to resolve "./components/connect" from "node_modules/react-redux/lib/index.js"

这是我的package.json文件。

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject"
  },
  "dependencies": {
    "eslint-config-rallycoding": "^3.2.0",
    "expo": "^32.0.0",
    "firebase": "^5.10.0",
    "lodash": "^4.17.11",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "react-native-communications": "^2.2.1",
    "react-native-router-flux": "^4.0.6",
    "react-redux": "^5.1.1",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "babel-preset-expo": "^5.0.0"
  },
  "private": true
}

1 个答案:

答案 0 :(得分:0)

我已经能够通过将react-redux降级为^4.4.10版本来解决此问题