ionic-team / ionic-react-conference-app

The Ionic Conference Demo App - Now in React

Home Page:https://ionic-react-conference-app.firebaseapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ionic cap add android: Could not resolve dependency: peer @capacitor/core@"^4.0.0" from @capacitor/android@4.1.0

GutyECUADOR opened this issue · comments

Hi i want to do the android build but has this error when type: ionic cap add android. Any advise?

PS C:\Users\Guti0\Desktop\ionic-react-conference-app-master> ionic cap add android

capacitor.cmd add android
[capacitor] [error] npm ERR! code ERESOLVE
[capacitor] npm ERR! ERESOLVE unable to resolve dependency tree
[capacitor] npm ERR!
[capacitor] npm ERR! While resolving: ionic-react-conference-app@0.0.1
[capacitor] npm ERR! Found: @capacitor/core@1.3.0
[capacitor] npm ERR! node_modules/@capacitor/core
[capacitor] npm ERR! @capacitor/core@"1.3.0" from the root project
[capacitor] npm ERR!
[capacitor] npm ERR! Could not resolve dependency:
[capacitor] npm ERR! peer @capacitor/core@"^4.0.0" from @capacitor/android@4.1.0
[capacitor] npm ERR! node_modules/@capacitor/android
[capacitor] npm ERR! @capacitor/android@"*" from the root project
[capacitor] npm ERR!
[capacitor] npm ERR! Fix the upstream dependency conflict, or retry
[capacitor] npm ERR! this command with --force, or --legacy-peer-deps
[capacitor] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
[capacitor] npm ERR! See C:\Users\Guti0\AppData\Local\npm-cache\eresolve-report.txt for a full report.
[capacitor] npm ERR! A complete log of this run can be found in:
[capacitor] npm ERR! C:\Users\Guti0\AppData\Local\npm-cache_logs\2022-08-25T16_46_57_230Z-debug-0.log
[capacitor]
[ERROR] An error occurred while running subprocess capacitor.

    capacitor.cmd add android exited with exit code 1.

This project is currently targeting an old version of Capacitor: https://github.com/ionic-team/ionic-react-conference-app/blob/master/package.json#L6.

The project would need to be updated to Capacitor 4 to be compatible with @capacitor/android@4.1.0

closing since the project was updated to use Capacitor 4