在expo上运行我的项目,我不断收到此错误,表明React Native版本不匹配:
因此,我进入package.json
文件以查看发生了什么事情,结果发现我的react-native版本与JS版本匹配。
在这里
{
"name": "PTP",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"moment": "^2.24.0",
"prop-types": "^15.6.2",
"react": "16.6.3",
"react-dom": "^16.8.1",
"react-native": "^0.60.5",
"react-native-elements": "^1.1.0",
"react-native-gesture-handler": "^1.0.15",
"react-native-image-picker": "^0.28.0",
"react-native-keyboard-aware-scroll-view": "^0.8.0",
"react-native-loading-spinner-overlay": "^1.0.1",
"react-native-picker-select": "^6.1.0",
"react-native-simple-toast": "0.0.8",
"react-native-vector-icons": "^6.2.0",
"react-navigation": "^2.0.0",
"react-redux": "^6.0.0",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-persist": "^5.10.0",
"redux-promise": "^0.6.0",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-core": "7.0.0-bridge.0",
"babel-jest": "24.0.0",
"jest": "24.0.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./assets/Fonts/Fonts/"
]
}
}
我有什么要注意的吗?我查看了其他人为解决此问题所做的工作,但经过进一步研究,他们的react-native
版本确实不匹配。所以我现在很困惑