Я создаю новое собственное приложение реагирования с использованием реагирования-навигации.
Каждый раз, когда я делаю npm install --save react-navigation
, я вижу набор предупреждений, связанных с обработчиком реагирования-родным-жестом.Я создаю новое приложение, используя react-native init Test
, и следующим шагом была установка реакции-навигации.
Ниже приведены предупреждения и ошибки:
npm WARN jest-resolve@24.5.0 requires a peer of jest-haste-map@^24.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN jest-resolve-dependencies@24.5.0 requires a peer of jest-haste-map@^24.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN jest-snapshot@24.5.0 requires a peer of jest-haste-map@^24.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-drawer@1.3.0 requires a peer of react-native-gesture-handler@^1.0.12 but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-stack@1.1.1 requires a peer of react-native-gesture-handler@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @react-navigation/native@3.3.0 requires a peer of react-native-gesture-handler@* but none is installed. You must install peer dependencies yourself.
При импорте библиотеки в моемкод и работает на симуляторе iOS, я получаю сообщение об ошибке:
Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(Unable to resolve module `react-native-gesture-handler` from `Documents/Code/Test/node_modules/@react-navigation/native/src/Scrollables.js`: Module `react-native-gesture-handler` does not exist in the Haste module map
Я попытался удалить папку node_modules в моем приложении и снова запустил 'npm install' и 'npm install --save реагировать-навигацию', но это решило проблему.
Запрос совета.