Unable to fix npx expo-doctor issues

❯ npx expo-doctor
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✖ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Detailed check results:

Expected package @expo/config-plugins@~7.2.2
Found invalid:
  @expo/config-plugins@5.0.4
  (for more info, run: npm why @expo/config-plugins)
Expected package @expo/prebuild-config@~6.2.4
Found invalid:
  @expo/prebuild-config@5.0.7
  (for more info, run: npm why @expo/prebuild-config)
Advice: Upgrade dependencies that are using the invalid package versions.

I tried deleting node_modules, package-lock.json. I also tried setting these as Resolutions on package.json. I tried directly uninstalling the particular versions. Nothing is working. How can I fix this?