import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
import { NavigationContainer } from '@react-navigation/native'
这是错误消息。
Unable to resolve "react-native-screens" from "node_modules\@react-navigation\bottom-tabs\src\views\BottomTabView.tsx"
Failed building JavaScript bundle.
npm install @react-navigation/bottom-tabs
或如果您使用了纱线卷装管理器,
yarn add @react-navigation/bottom-tabs
如果添加了此软件包,是否更新了pod文件?
cd ios
pod install
npm install --save react-native-gesture-handler react-native-reanimated react-native-screens
检查文档https://reactnavigation.org/docs/getting-started/希望这会有所帮助!