【发布时间】:2025-11-25 20:10:02
【问题描述】:
打算做什么
- 使用 expo 创建 react-native
- 添加反应导航
第一个效果不错
第二个任务有警告
第二个任务的步骤
-
安装 React 导航
npm install react-navigation --legacy-peer-deps
-
安装依赖项
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
-
安装 React 导航堆栈
npm install react-navigation-stack @react-native-community/masked-view --legacy-peer-deps
-
使用
expo r -c启动应用并清除缓存
警告日志
编译时带有警告。 C:/Users/GBENGE AONDOAKULA/Documents/Node/food/node_modules/react-native-gesture-handler/lib/module/index.js “在'./handlers/gestures/gestureComposition'中找不到导出'ComposedGestureType'(重新导出为'ComposedGesture')
node_modules/react-native-gesture-handler/lib/module/index.js “在'./handlers/gestures/gestureComposition'中找不到导出'ComposedGestureType'(重新导出为'ComposedGesture')
node_modules/react-native-gesture-handler/lib/module/index.js “在'./handlers/gestures/gestureComposition'中找不到导出'ExclusiveGestureType'(重新导出为'ExclusiveGesture')
node_modules/react-native-gesture-handler/lib/module/index.js “在'./handlers/gestures/flingGesture'中找不到导出'FlingGestureType'(重新导出为'FlingGesture')
node_modules/react-native-gesture-handler/lib/module/index.js “在'./handlers/gestures/forceTouchGesture'中找不到导出'ForceTouchGestureType'(重新导出为'ForceTouchGesture')
node_modules/react-native-gesture-handler/lib/module/index.js “在'./handlers/gestures/gestureStateManager'中找不到导出'GestureStateManagerType'(重新导出为'GestureStateManager')
node_modules/react-native-gesture-handler/lib/module/index.js “在'./handlers/gestures/longPressGesture'中找不到导出'LongPressGestureType'(重新导出为'LongPressGesture')
node_modules/react-native-gesture-handler/lib/module/index.js “在'./handlers/gestures/manualGesture'中找不到导出'ManualGestureType'(重新导出为'ManualGesture')
【问题讨论】:
-
请修剪您的代码,以便更容易找到您的问题。请按照以下指南创建minimal reproducible example。
标签: javascript react-native react-navigation react-native-gesture-handler