Each Capacitor 243,123 major raises platform minimums and changes the native templates in your committed android/ and ios/ folders, which npm 2,036 install cannot touch. cap migrate applies those template changes, one major at a time: the Capacitor 8 CLI refuses projects older than 7. Commit first, so you can review the diff. Here it upgrades a Capacitor 7.6.9 copy of BookNest:
npm i -D @capacitor/cli@latest
npx cap migrate --noprompt --packagemanager npm✔ Installing Latest Modules using npm. in 8.58s ✔ Running cap sync. in 2.74s ... ✔ Upgrading gradle wrapper in 265.14s [info] Set com.android.tools.build:gradle = 8.13.0. ... [success] Migration to Capacitor ^8.0.0 is complete. Run and test your app!
The diff showed every @capacitor/* package at 8.5.2 (Preferences at 8.0.1), Gradle 8.11.1 19,597 raised to 8.14.3, the Android Gradle Plugin 8.7.2 234 to 8.13.0, and variables.gradle moved from minSdkVersion = 23 and SDK 35 to 24 and 36. Steps it cannot patch appear as warnings; finish those from the upgrade guide (capacitorjs.com/docs/updating/8-0 (https://capacitorjs.com/docs/updating/8-0 243,123 )). Capacitor 8 also needs Node 22 and JDK 21.