Había instalado una versión anterior antes, pero quiero actualizar a la versión 8, pero no sé cómo enfrentar estos errores
estos son los errores actuales que estoy viendo
npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: fyp@1.0.0 npm ERR! Found: @react-navigation/native@3.5.0 npm ERR! node_modules/@react-navigation/native npm ERR! @react-navigation/native@"~3.5.0" from react-navigation@3.11.1 npm ERR! node_modules/react-navigation npm ERR! react-navigation@"^3.11.1" from the root project npm ERR! peer @react-navigation/native@"^3.1.1" from react-navigation-drawer@1.2.1 npm ERR! node_modules/react-navigation-drawer npm ERR! react-navigation-drawer@"~1.2.1" from react-navigation@3.11.1 npm ERR! node_modules/react-navigation npm ERR! react-navigation@"^3.11.1" from the root project npm ERR! 1 more (react-navigation-stack) npm ERR! npm ERR! Could not resolve dependency: npm ERR! react-navigation-header-buttons@"8.0.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: @react-navigation/native@6.0.10 npm ERR! node_modules/@react-navigation/native npm ERR! peer @react-navigation/native@">=5" from react-navigation-header-buttons@8.0.0 npm ERR! node_modules/react-navigation-header-buttons npm ERR! react-navigation-header-buttons@"8.0.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR!ACTUALIZAR (obtuve la solución):
instale una versión inferior de react-navigation-header-button. la versión 6 funcionó para mí.
En su paquete, tiene @react-navigation/native versión 3.5.0 .
Intente actualizar la versión @react-navigation/native a >=5 usando
npm i @react-navigation/native@latest o npm i @react-navigation/native@version_you_want(>=5)
Luego puede usar react-navigation-header-buttons para la versión 8.0.0
O como alternativa
Puede usar npm i --legacy-peer-deps si no puede tener que actualizar el paquete @react-navigation/native