我已使用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
}
答案 0 :(得分:0)
我已经能够通过将react-redux
降级为^4.4.10
版本来解决此问题