Hello, I have the following error when trying to compile my ionic project to android. chatgpt tells me that I should change the path package.json but when I do so it generates another error

[Error: ENOENT: no such file or directory, open ‘C:\Users\MarcelaZenteno\Desktop\icov\proyecto-mobile\mobile-trade\android\package.json’] {
errno: -4058,
code: ‘ENOENT’,
syscall: ‘open’,
path: ‘C:\Users\MarcelaZenteno\Desktop\icov\proyecto-mobile\mobile-trade\android/package.json’
}
[ERROR] An error occurred while running subprocess cordova.

This is the other error, if someone can help me, I’ve been trying to solve it for 5 days.

C:\Users\MarcelaZenteno\Desktop\icov\proyecto-mobile\mobile-trade>ionic cordova platform add android
[ERROR] Cannot load Cordova config.

    Could not find necessary file(s): config.xml, package.json.

    - .\config.xml
    - .\package.json

    You can re-add the Cordova integration with the following command: ionic integrations enable cordova --add

Looks like you are trying to add Cordova to a Capacitor project and the Cordova CLI thinks the Capacitor’s “android” folder is a Cordova platform, which it isn’t.

If you want to use Cordova, rename or remove the android folder and run the platform add command again.

I did what you recommended but now I get this error that I don’t know how to solve, there are two dependencies that need a different version of the same package

npm ERR!
npm ERR! While resolving: @agm/core@3.0.0-beta.0
npm ERR! Found: @angular/common@12.1.5
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@“12.1.5” from @angular/forms@12.1.5
npm ERR! node_modules/@angular/forms
npm ERR! peer @angular/forms@“>=8.2.7” from @ionic/angular@5.7.0
npm ERR! node_modules/@ionic/angular
npm ERR! @ionic/angular@“^5.5.2” from the root project
npm ERR! @angular/forms@“~12.1.1” from the root project
npm ERR! peer @angular/common@“12.1.5” from @angular/platform-browser@12.1.5
npm ERR! node_modules/@angular/platform-browser
npm ERR! peer @angular/platform-browser@“12.1.5” from @angular/forms@12.1.5
npm ERR! node_modules/@angular/forms
npm ERR! peer @angular/forms@“>=8.2.7” from @ionic/angular@5.7.0
npm ERR! node_modules/@ionic/angular
npm ERR! @ionic/angular@“^5.5.2” from the root project
npm ERR! 1 more (the root project)
npm ERR! peer @angular/platform-browser@“12.1.5” from @angular/platform-browser-dynamic@12.1.5
npm ERR! node_modules/@angular/platform-browser-dynamic
npm ERR! @angular/platform-browser-dynamic@“~12.1.1” from the root project
npm ERR! 2 more (@angular/router, the root project)
npm ERR! 3 more (@angular/platform-browser-dynamic, @angular/router, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@“^9.1.0 || ^10.0.0” from @agm/core@3.0.0-beta.0
npm ERR! node_modules/@agm/core
npm ERR! peer @agm/core@“3.0.0-beta.0” from @agm/markerclusterer@3.0.0-beta.0
npm ERR! node_modules/@agm/markerclusterer
npm ERR! @agm/markerclusterer@“^3.0.0-beta.0” from the root project
npm ERR! @agm/core@“^3.0.0-beta.0” from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/common@10.2.5
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@“^9.1.0 || ^10.0.0” from @agm/core@3.0.0-beta.0
npm ERR! node_modules/@agm/core
npm ERR! peer @agm/core@“3.0.0-beta.0” from @agm/markerclusterer@3.0.0-beta.0
npm ERR! node_modules/@agm/markerclusterer
npm ERR! @agm/markerclusterer@“^3.0.0-beta.0” from the root project
npm ERR! @agm/core@“^3.0.0-beta.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!
npm ERR! See C:\Users\MarcelaZenteno\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: