尝试运行项目时出现错误。
捆绑失败:错误:无法从react-native-screens
解析模块H:\T16\Booster\node_modules\react-navigation-stack\lib\module\views\StackView\StackViewCard.js
:急速模块图中不存在模块react-native-screens
这是节点中错误的屏幕截图 enter image description here
我已经按照人们的建议安装了这些软件包
“反应本机屏幕”
“反应原生复活”
“反应本地手势处理程序”
我的React本机版本是59.5
但仍未解决。在这里,我给了package.json文件
{
"name": "Booster",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"@grpc/grpc-js": "^0.6.14",
"@react-native-community/datetimepicker": "^2.2.3",
"@react-navigation/native": "^5.1.4",
"firebase": "^7.6.0",
"grpc": "^1.20.2",
"moment": "^2.24.0",
"native-base": "^2.12.1",
"react": "16.8.3",
"react-native": "0.59.5",
"react-native-fbsdk": "^0.8.0",
"react-native-gesture-handler": "^1.6.1",
"react-native-google-signin": "^2.0.0",
"react-native-html-to-pdf": "^0.8.0",
"react-native-modal": "^11.5.4",
"react-native-pie": "^0.5.0",
"react-native-push-notification": "^3.1.3",
"react-native-reanimated": "^1.7.1",
"react-native-screen": "^1.0.0",
"react-native-splash-screen": "^3.2.0",
"react-native-swipeout": "^2.3.6",
"react-native-swiper": "^1.5.14",
"react-native-vector-icons": "^6.4.2",
"react-navigation": "^3.0.8",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-saga": "^0.16.0",
"rn-fetch-blob": "^0.10.16"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/runtime": "^7.4.4",
"babel-jest": "^24.7.1",
"jest": "^24.7.1",
"metro-react-native-babel-preset": "^0.53.1",
"react-test-renderer": "16.8.3"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./src/assets/fonts/"
]
}
}
答案 0 :(得分:0)
react-native-screens这是软件包。但是在package.json文件中,它只是react-native-screen。请更改它。