本机导航无法解析模块

问题描述 投票:0回答:1

我收到一个错误,即在项目中找不到@ react-navigation / native。我试图安装它,而我的package.json文件说。我不确定下一步该如何运行它。干杯{ "name": "sample", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "@react-native-community/masked-view": "^0.1.10", "@react-navigation/native": "^5.5.1", "@react-navigation/stack": "^5.5.1", "react": "16.11.0", "react-native": "0.62.2", "react-native-gesture-handler": "^1.6.1", "react-native-reanimated": "^1.9.0", "react-native-safe-area-context": "^3.0.4", "react-native-screens": "^2.8.0" }, "devDependencies": { "@babel/core": "^7.10.2", "@babel/runtime": "^7.10.2", "@react-native-community/eslint-config": "^2.0.0", "babel-jest": "^26.0.1", "eslint": "^7.2.0", "jest": "^26.0.1", "metro-react-native-babel-preset": "^0.59.0", "react-test-renderer": "16.11.0" }, "jest": { "preset": "react-native" } }

react-native react-navigation
1个回答
0
投票

有时我也会遇到该问题,当我重新启动应用程序后,问题就消失了。不过,我不知道为什么会这样。

© www.soinside.com 2019 - 2024. All rights reserved.