0

After running ionic cap add android from https://ionicframework.com/docs/angular/your-first-app/deploying-mobile had npm ERR!

 Found: @capacitor/core@3.3.4
npm ERR! node_modules/@capacitor/core
npm ERR!   @capacitor/core@"3.3.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @capacitor/core@"^3.4.0" from @capacitor/android@3.4.1
npm ERR! node_modules/@capacitor/android
npm ERR!   @capacitor/android@"3.4.1" from the root project

Bohdan Skochko
  • 151
  • 1
  • 5

1 Answers1

1

Problem figure out with next solution manually change verions in package.json.

Change version "@capacitor/core": "VERSION", VERSION should be the same as @capacitor/android VERSION

In my case set up "@capacitor/core": "3.4.1", because @capacitor/android@"3.4.1"

Bohdan Skochko
  • 151
  • 1
  • 5
  • Wanted to add for some other poor soul struggling that for me while `@capacitor/core` and `@capacitor/core` were matching - `@capactior/cli` was not and I didn't notice as it was at the bottom of the `package.json` under the `devDependencies`. Once I changed such that all were matching everything was grand. – Schybo Aug 07 '23 at 19:08