ERESOLVE unable to resolve dependency tree
Describe the bug
unable to resolve dependency tree once we upgraded to latest version of capacitor
To Reproduce
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @capacitor/[email protected]
npm ERR! node_modules/@capacitor/core
npm ERR! @capacitor/core@"^3.2.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @capacitor/core@"~1.3.0" from @ionic/[email protected]
npm ERR! node_modules/@ionic/react-hooks
npm ERR! @ionic/react-hooks@"0.0.8" 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.
Expected behavior Should install
I have the same problem after upgrading Node from ~v14 to ~v16. My impression from the README is that @ionic/react-hooks is no longer needed after upgrading capacitor. However, after removing it from my project, useRef no longer works.
@ionic/react-hooks (the old library) and @capacitor-community/react-hooks (the lib for cap v2), are not supported in capacitor v3. Check the readme for instructions on how to use with Capacitor v3